general questions

General questions, a forum discussion on Jojo CMS. Join us for more discussions on General questions on our General Discussion forum.

Back to Forum Index : Back to General Discussion   RSS
sudhakararaog

5 Jan 2010
Posts: 9

hi

i have recently started learning jojo and i am able to convert static html page to jojo template for a simple 1 column layout.

i have a couple of questions


1.
when i am editting a page how do i call an image when i click on the image icon i have to manually enter the path, so can i directly type
<img src="../images/image.jpg" /> or <img src="images/image.jpg" /> or <img src="images/image.jpg" />
among these 3 which is the correct path to display an image for a page


2.
each page title has | Jojo Cms at the end. i have removed |escape:"html":$charset from <title>{$displaytitle|escape:"html":$charset}</title> in head.tpl but the | Jojo Cms is not being removed from the title tag so i found another file
location = D:\wamp\jojocms\includes\jojo.php commented this line and it works. can this line be commented or should it be left
// $displaytitle = $displaytitle . Jojo::getOption('title_separator', ' | ') . $brandingtitle;


3.
i have replaced the jojo.ico favicon which is in D:\wamp\jojocms\plugins\jojo_core to a new one with the same filename favicon.ico can the dimensions be 16 X 16 or only 32 X 32


4.
where i can get a full list of variables. example = {$SITEURL} if i need to know the values of such variables


5.
how to call a javascript file from customhead.tpl i need to use an swf which needs a javascript file so where do i copy the javascript file and the swf file and how do i call javascript and the swf files


6.
can anyone provide sample jojo websites for reference


7.
where to check error logs, for example if there is an error in submitting the contact for details an error appears


8.
any plugin i try to download and i tried downloading all the 3 formats and when i unzip i get an error that
"jZip does not support the file format of the file you are trying to open. The archive file could not be opened"


please advice.

thanks
Rick Rick

6 Jan 2010
Posts: 336

Hi there...

In response to your questions...

1. Refer to the Jojo Image Guide, and yes, they must be manually entered. I'd like a better way to do this and am bouncing round ideas.

2. In your Options screen, go to the Site options and the setting called Site Title is what you're looking for. Also see Short Title.

3. The dimensions can be anything really, but try to keep it to multiples of 16 I guess. Also, you may see weird caching with this, if so, then try running Setup.

4. I'm not sure if there's an official list, but if you do a search in the files (most code editors can do this) for $smarty->assign then you'll find most of them. Note down the ones you'll need.

5. Try just writing a standard javascript include with the path leading to "/js/path/to/file.js" when your file is located at "plugins/your_plugin_name/js/path/to/file.js". If you have issues, put the js and swf files in an "external" folder in your plugin. Sorry, I'm just drawing a blank right now.

6. See here.

7. In your admin area (to use Harvey's original name for Jojo) go to Reports then Event Log.

8. That's odd, have you tried checking out the plugins svn?
Harvey

Core Developer

Harvey

6 Jan 2010
Posts: 327

Good answers.

To add a couple of points...

1. If you use the Xinha HTML editor, it has a GUI for adding images. Using the BB or quick HTML editor, you need to enter manually. Sorry, it's not ideal but is an issue shared by other systems as well (eg Magento).

3. favicon caching is a bit weird. To refresh your favicon after placing the new one in your theme, visit www.domain.com/favicon.ico and press CTRL-F5 (in Firefox). Then go back to the homepage and refresh normally and it should appear.

7. Issues with the contact form are very rarely Jojo's fault. If the mail doesn't arrive, and you have setup the contact addresses correctly in the options, then it's usually a DNS issue - in other words, the web server is delivering the mail to itself (which may be a black hole), rather than the correct mail server. Make sure you update the MX record for the domain on the web server, so mail is delivered to the right place. Jojo has no way of detecting this issue at present, though it would make a nice addition (do a couple of DNS lookups and compare, shouldn't be too hard).

8. Just to be sure, try another unzipper such as IZ Arc or 7 zip.
Rick Rick

6 Jan 2010
Posts: 336

Also in reply to 7... I've noticed that mail() function in PHP will not indicate if there's no local program to send external mail (eg no sendmail). Try installing sendmail if you're unix based, or configuring the SMTP options in the config screen.
Harvey

Core Developer

Harvey

6 Jan 2010
Posts: 327

Yep, the response from PHP's mail() function is pretty useless. Best to always make a habit of manually testing the contact form.
sudhakararaog

7 Jan 2010
Posts: 9

thanks a lot for replying

1.
in regards to the question about images, when i clicked the image icon to insert images in the pop up i entered /images/filename.jpg i got these two
<img src="null" alt="null" /> <img src="images/filename.jpg" alt="alt message" />
<img src="null" alt="null" /> = what is this meant for i have removed it anyway
i am able to see the image if i have <img src="images/filename.jpg" alt="alt message" /> without / before images


2.
About the title i have changed the Site Title and regarding the | Sign in the title for every page i guess its ok if i remove the | sign from Title separator in Manage Site

Options -> SEO
or does some kind of separator need to be used


3.
i have renamed the default favicon.ico located at D:\wamp\jojocms\plugins\jojo_core and have uploaded a new file with name as favicon.ico with 16 X 16 and i have run the setup

and cleared the browser cache and used ctrl f5 however i see the old favicon i have also type http://localhost/jojo/favicon.ico and i see the new favicon but when i access
http://localhost/jojo and other pages i see the old favicon
i have also copied the favicon into the theme folder at D:\wamp\jojocms\themes\themename
however the new favicon is not appearing its the old one


5.
flash file =
i am not able to display the flash file
i have the following in order to display a swf file
<script language="javascript" type="text/javascript" src="AC_RunActiveContent.js">
</script>

<script type="text/javascript">
AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','900','height','200','src','banner','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','banner' ); //end AC code
</script>

<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="900" height="200">

<param name="movie" value="banner.swf" />
<param name="quality" value="high" />
<embed src="banner.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"
width="900" height="200">
</embed>
</object>
</noscript>

1. i have created a folder called js in D:\wamp\jojocms\themes\themename and copied AC_RunActiveContent.js into js folder
2. i have a customhead.tpl file in D:\wamp\jojocms\themes\themename\templates
3. copied the swf file into D:\wamp\jojocms\themes\themename\images

in the customhead.tpl i have written the following to specify where the js file is
<script language="javascript" type="text/javascript" src="js/AC_RunActiveContent.js">
</script>

in the html code for displaying the swf file which is located in images folder, where it is mentioned as banner it needs to be specified that the swf file which is banner.swf is

located in images folder i have tried various combinations but i am not able to show the swf file

AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','900','height','200','src','images/banner','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','/images/banner' ); //end AC code

<param name="movie" value="images/banner.swf" />
<embed src="images/banner.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-
flash" width="900" height="200">

8.
plugins
any plugin i download from http://www.jojocms.org/plugins
i am get the error
jZip does not support the file format of the file you are trying to open. The archive file could not be opened

i have tried downloading using different browsers and when i unzip i get the error
i am using jZip to unzip the plugins




also during development since there will be a need to constantly refresh the page to see the changes, i have set the Content Cache to Off from the 1st screen of the admin page.
i am able to see the changes immediately without using ctrl f5 which i used to do. do you think this is a good idea. for a production site i guess the Content Cache needs to be set to On


as mentioned in the installation documentation, the mysite directory should be outside the webroot. initially before i started the installation i created the mysite directory out d:/wamp/www
after i installed jojo during the last few steps following line was generated automatically
define('_MYSITEDIR', 'D:/wamp/www/mysite');

and i did not change this to D:/wamp/mysite

so if i now change the value of
define('_MYSITEDIR', 'D:/wamp/www/mysite');
in config.php to D:/wamp/mysite and copy the mysite folder to d:/wamp will jojo work as usually without any issues


thanks
Harvey

Core Developer

Harvey

8 Jan 2010
Posts: 327

Only have time for a quick reply, so I'll answer what I can...

2. You can do what you like for the title separator, though I struggle to think why you would use anything other than a dash, pipe or comma.

3. Don't edit the favicon file in the jojo_core plugin. Instead, upload a file to themes/YOURTHEME/favicon.ico - this way, your favicon will remain when you upgrade Jojo.

Use my trick above for refreshing the favicon - and if it doesn't work, don't stress about it. I have noticed that weird things happen locally with favicons, but on productions sites it works fine. If in doubt, test with a fresh browser that hasn't visited the site before.

5. Use the jojo_swfobject plugin. Then read up on swfobject to see how to insert flash into your page - this is a more standard apprach than the code you have above. Flash files don't take kindly to being pre-processed by PHP, so make sure you store all flash content in the webroot (not in the theme).

also during development since there will be a need to constantly refresh the page to see the changes, i have set the Content Cache to Off from the 1st screen of the admin page.
i am able to see the changes immediately without using ctrl f5 which i used to do. do you think this is a good idea. for a production site i guess the Content Cache needs to be set to On

Personally, I develop with caching off, debug mode off, and use CTRL-F5 when I need to refresh a page properly. I also don't use the Google-hosted javascript option when developing locally. For production, turn caching on, debug off, google javascript on. CTRL-F5 will work even when caching is enabled, so it's handy for small tweaks to production sites. The cache is also cleared every time a page is saved in the admin section, so users shouldn't need to worry about stale cache during normal edits of content.

so if i now change the value of
define('_MYSITEDIR', 'D:/wamp/www/mysite');
in config.php to D:/wamp/mysite and copy the mysite folder to d:/wamp will jojo work as usually without any issues

Yes, move the mysite folder anywhere you like and change the config file. You will need to update the permissions on the cache / downloads folders in the new location. You may need to run setup again, but you won't have any issues. On a WAMP install, you won't need to worry about the permissions.
sudhakararaog

8 Jan 2010
Posts: 9

alright then thanks for your reply
Back to Forum Index : Back to General Discussion   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.