I use Froala Editor for my project cakephp
I've done every step as in the guidelines, but the results are not as expected
I downloaded it and follow the instructions as here enter link description here
download and put Froala folder in app/Plugin/
in boostrap.php i have loaded CakePlugin::load('Froala');
in controller: i have put line: public $helpers = array('Froala.Froala');
in view: my code is
<div id="froala-editor">
<p>froala-editor</p>
</div>
<?php $this->Froala->editor('#froala-editor'); ?>
but Froala editor not appear, Please help me!!!! Thank so much
I think, today Froala have release a solution for Cake php 3 which might help your problem.
https://github.com/froala/wysiwyg-cake
Do this:
open terminal/command prompt (windows)
type composer require froala/wysiwyg-cake enter
open bootstrap.php (confic folder)
add Plugin::load('Froala'); to the end of page
open AppController.php (your project/src/controller/AppController)
Declare variable public $helpers = array('Froala.Froala');
In the view page (template) you add <?= $this->Froala->editor('#froala-editor'');?>
Related
I've inherited a very large Drupal site and need to edit the content in $linked_site_logo as below, but I have no idea where to find this file.
<div id="logo"><?php print $linked_site_logo; ?></div>
What is typically the file structure for a large-scale Drupal site and where should I begin looking to edit this? I haven't been able to locate the file.
There seems to be an answer on a drupal community which might help you. https://www.drupal.org/project/corolla/issues/1472416 - which suggests the code maybe in the page.tpl.php file
However, your best bet might be to use your terminal or code editor to do a search across the code base for the line of code, as there could be multiple references to the logo being included.
It's probably in your theme template files page.tpl.php or in include header file. Use theme debug mode, put this in your settings.php at the end of the file:
$conf['theme_debug'] = TRUE;
Than inspect element using your browser and see where elements come from.
I am trying to do something really simple which I've done a thousand times already. I am trying to import a JS file on CakePHP using the Html Helper and instead of the "src" attribute i get a "facebook" attribute . Here is what I am doing:-
echo $this->Html->script('bootstrap.min');
and here is the result:-
<script type="text/javascript" facebook="/js/bootstrap.min.js">
I am using a fresh install of CakePHP 2.7.6.
Just keep you js folder in webroot directory, then it will work hopefully.
Secondly, you have written the correct syntax
<?php echo $this->Html->script('bootstrap.min'); ?>
third, it is also depends upon the .htaccess file. if you don't get your path correct then tell me, where you have kept your project, and what you have written in your .htaccess file.
Thanks.
Are you using the CakePHP HtmlHelper or have you customised this?
If you take a look at the HtmlHelper you should see that it is doing a simple sprintf() of $this->_tags['javascriptlink'] which is defined on line 103 as:-
'<script type="text/javascript" src="%s"%s></script>'
No mention of facebook. Your code is clearly not doing this. So check that this tag is correctly set in the helper that you are using.
I have a codeigniter project that is already up and running perfectly on the client server, now after I changed my laptop and installed xammp 1.8.2 the project is not working correctly,
the index page works just fine, and when I try to log in it only displays these two lines
load->view('header');?>
load->view('side_menu'); ?>
These two lines are the only php code in the view Home.php ,so the problem is that load view function in the controller loads the view "Home.php" but only displays the php code
The hierarchy is:
application
controller
main_controller.php
view
home.php
and attached a screen shot of the displaying
Could any one help me with that???
Thanks in advance
Given your example, You will need to open your php document with <?php and end it with ?> (not on each line as you have it.)
You will also need to use $this from the controller class.
<?php
$this->load->view('header');
$this->load->view('side_menu');
?>
I'am templating the website under the Joomla 3.2.0 for HikaShop ecommerce component, and would like to find out which file is loaded with following code, so I could correctly override the styles for specific file.
The filename I'a working with is root\templates\MY_TEMPLATE\html\com_hikashop\user\registration.php. Inside that file there is a small part of code which underloads custom fields I would like to override with custom styles:
<div class="address-fields">
<?php
$this->type = 'address';
echo $this->loadTemplate();
?>
</div>
Anyone knows which filepath is exactly loaded with the following $this->loadTemplate(); ?
Not sure if you are using it the same way as it is used here, but they explain it as if the parameters you pass in the function loadTemplate(), actually as loadTemplate(address) would be files in your case found in registration_address.php
hey, It's worth a shot checking it out
SEE HERE
I am trying to set up sublime text 2 with PHP, but I am having some trouble getting the snippets to work. I have loaded a PHP project and see that the syntax is correctly set to PHP. When I go to preferences -> browse -> packages _>php , I can see a number of PHP snippets that I am unable to activate including $_files $_get ,$post. As far as I can tell, the tab trigger for these are '$_'
<snippet>
<content><![CDATA[\$_COOKIE['${1:variable}']]]></content>
<tabTrigger>$_</tabTrigger>
<scope>source.php</scope>
<description>COOKIE['…']</description>
</snippet>
but this does not generate any snippets being displayed, when I try it in a php file.
Can anyone give me advice on what to do next?
Thank you,
Bill.
Works on my Sublime Text 2, but only within the <?php ?> tags, not just in a file called .php.
Typing "$_ + TAB" within <?php ?> tags gives a list of all the $_ Snippets COOKIE, FILES, ENV, etc...
My next steps would be:
Do other Snippets work?
Did you create a Snippet that could overrule the $_ ?
Re-install ;-)
You enabled the source for php, you can only be call this snippet in your php file only.
create new file and save as somename.php
write <?php after
type $_ and hit TAB or Ctrl + Space
It generates the snippet, lets happy coding.