May 142013
 

Revision Update: Tested with the latest WordPress Beta 3 version and  TinyMCE Advanced.

Revised on WordPress 3.5.1 and latest TinyMce Advance Plugin version 3.5.8

If you have updated the plugin to the latest version and you are running the latest WordPress version then your problem should be resolved.

I have tested the latest version of WordPress and TinyMce Advance Plugin on the following browsers running Windows 7.

The browsers tested:

  1. IE 9
  2. FireFox 18.0.2
  3. Chrome 25.0.1364.84
  4. Seamonkey 2.15.2

Remember: Always have the latest version of the browser installed. Make sure you clear your cache regularly. Make sure Java is updated.

I have set the Advanced options settings under TinyMCE Advanced settings to: Stop removing…… and now what you see when entering or copying the script code under HTML editor and saving it.

Your script is now enclosed between <p>code<p> html tags. See image below:

 add javascript to wordpress

The following instructions are for those who are still using the old version of WordPress and an earlier version of TinyMCE Advanced plugin and are still having problems inserting JavaScript to pages or post.

To add a JavaScript file i.e from youtube to your page or post click on HTML on the top editors bar on your WordPress editor and paste your code into the page. See image below.

Add javascript to wordpress page or post image 1

Once you are in the HTML editor paste or type your code. See image below.

Add javascript to wordpress page or post image 2

The image above should work but what happens when you click on Visual tab and then click on HTML tab again the code disappears. This is very strange and I have tested the above on FireFox, IE, Chrome and Seamonkey browsers and get the same result. So in order to eliminate this issue after extensive research on the internet I came up with the conclusion of adding some code in between script tag and paragraph tag. By adding some html tag code it stops WordPress wysiwyg editor from striping the code. I added a line space html code see image below.

Add javascript to wordpress page or post image 3

When you click on the Visual tab and then click on HTML tab, WordPress wysiwyg editor creates a space and 3 lines. See image below.

Add javascript to wordpress page or post image 4

While you are in HTML editor click on update then click on Visual tab and again HTML tab and it adds a break html tag or in some case it might add 2 break html tags and also a space in between the break tag and the closing paragraph tag. See image below.

Add javascript to wordpress page or post image 5

Now you can just leave the page and navigate else where in WordPress. This can become very messy and sometimes it does not work well depending on the browser you use.  If you deactivate the plugin TinyMce Advance you will not experience the same issue above.

Alternative you can use one of these two plugins Pure Html and RawHtml, which works very well.

I have tested PureHTML in WordPress 3.5.1 and it works. Raw HTML recently was updated up to version 1.4.10 compatible with WordPress 3.6 Beta 2. I prefer Raw Html because it is kept up to date and more users have downloaded this plugin more than Pure Html. I have tested this version with the latest WordPress beta version 3 and it works well. Remember if it does not work for you, always report it to the developers. The culprit will always be another plugin or sometimes it is the theme. If you try this plugin make sure you create a backup just in case it causes other issues as previously mentioned.  

I hope this helps you and puts you on the right track. If you need any help just leave a comment.

Come back for more information as I keep updating this post.

Good luck ;)

May 092013
 

Troubleshooting CataBlog post will help you resolve some of the most common troubleshooting questions asked about CataBlog. Most of the answers can be found at catablog.illproductions.com website.

This list will grow as I come across more questions and answers.

1 ) How to change the lightbox title font?

Change the following CSS class for lightbox.

html body #catablog-lightbox-meta .catablog-lightbox-title { 
font-family: helvetica, sans-serif; 
font-size: 10pt; 
line-height: 1; 
}

2 ) Permalink and navigation not working:

Check the following on your website:

CataBlog >> Options >> Public = Enable Individual Pages and Category Archives: make sure it is checked.

Also check the following Options:

CataBlog >> Options >> Navigation = Show Extra Navigation Info: make sure it is checked

Also check to make sure your permalink in WordPress is set correctly:

Settings >> Permalinks = check these settings and make sure they are set correctly


3 ) How to increase the width and height for the thumbnail?

CataBlog >> Options >> Thumbnails and edit the settings in this section.


4 ) How to add shortcode to description?

First have a read at this link , pay attention to the description tab information.

Make sure you have enable the following under WordPress Admin panel >> CataBlog >> Description >> Enable WordPress Filters ?


5 ) How to link thumbnails to a URL or file

Go to CataBlog >> Library and edit an image. Under Fields >> Link enter a relative or absolute web address to create a hyperlink to the item. This can also be a link to a file. For example you want to link a pdf file and it is located under . You would enter that URL in the Link to create an absolute link to the pdf file.

When you click on the image from your website it will link to the above URL, which is the pdf file using the following shortcode template.

[catablog template="gallery"]


6 ) How to add price to Catablog when using lightbox?

All you have to do is enter the price token inside the catablog-description div in which ever template you use. I have added the token %PRICE% to the default template.

<div class=”catablog-row %CATEGORY-SLUGS%”>
    <div>
        %MAIN-IMAGE%
        %SUB-IMAGES%
    </div>
    <h3 class=”catablog-title”>%TITLE-LINK%</h3>
    <div class=”catablog-description”>
        <p>%PRICE%</p>
    <p>%DESCRIPTION%</p>
        %BUY-NOW-BUTTON%
    </div>
</div>


7 ) How to Customize  Catablog Gallery?

This is quoted by Zach on a WordPress post.

You only want to override the specific CSS properties that you need to change, not all of them. Try putting this code into your theme’s styles.css file or create a catablog.css file in your theme’s folder. Never ever directly modify the plugin’s catablog.css file, as your changes will be overwritten the next time you upgrade. The following code will create a 1 px black colour border around each gallery.

Hint: Always work with a child theme.

.catablog-gallery.catablog-row {
  border: 1px #000 solid !important;
}

.catablog-gallery.catablog-row .catablog-title {
  height: 100px !important;
  background: purple;
  opacity: 0.1;
}

8 ) How to add alt to images to improve SEO

In some cases you want to make sure that all your images have an alt description to improve your SEO. CataBlog has a few tokens that will permit this by adding them to your template. Have a look at the default template below:

<div class='catablog-row %CATEGORY-SLUGS%'>
	<div>
		%MAIN-IMAGE%
		%SUB-IMAGES%
	</div>

	<h3 class='catablog-title'>%TITLE-LINK%</h3>

	<div>
		<p>%DESCRIPTION%</p>
		%BUY-NOW-BUTTON%
	</div>

</div>

I want to add the alt tag to the image thumbnail so I will create a custom template and add the following

<img src="%IMAGE-THUMBNAIL%" alt="%TITLE%" />

 What if you wanted to add extra information because you wanted to add a category plus the title of the image? 

<img src="%IMAGE-THUMBNAIL%" alt="add category name here %TITLE%" />

Remember there are numerous ways to achieve this by using tokens. If you want to read more about it, have a look at Zach’s making custom templates page.


9 ) After updating the plugin, I am getting the following error, “Warning: mb_substr() expects parameter 3 to be long, string given in /home/mattabou/public_html/wp-content/plugins/catablog/lib/CataBlog.class.php on line 3615″

macguru2000, one possible solution to the problem above is:  

If you are still able to load the CataBlog Options in Admin, make sure you have the excerpt length set to a number in the Description section of CataBlog Options. 

Feb 072013
 

W3 Total Cache Troubleshooting post will help you resolve some of the issues that keep occurring with this great plugin. The information below is a collection from the wordpress.org/support/plugin/w3-total-cache website.

I decided to write this post to help everyone that needs some tips or needed to resolve their issue and could find as many solutions in the one place.

What you need:

- Access to your server through FTP, cpanel or other means

Have a look at the following images to learn more about which files you will be deleting.

w3-total-cache-plugin

The following removes the whole w3-total-cache folder from the server.

w3-total-cache-plugin-2

Removing W3 Total Cache Completely

1 ) Remove the following files in ‘wp-content’ folder.
- advanced-cache.php
- db.php
- object-cache.php

2 ) Remove the folder named w3-total-cache that may be residing in ‘wp-content/plugins’ folder.

3 ) Remove the line define(‘WP_CACHE’, true); in your wp-config.php file.

4 ) Remove /wp-content/w3tc/ dir

5 ) Remove /wp-content/w3-total-cache-config.php file

For W3 Total Cache 0.9.2.6/7/8 add also the following steps:

6 ) Remove /wp-content/w3tc-config/ dir

7 ) Remove /wp-content/cache/ dir

8 ) Delete all the entries in your .htaccess file and make sure the following are added.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

I will be adding more information and solutions as I come across them from forums.

All credit is given to all who have contributed to the solutions mentioned above from the plugin’s link mentioned above and forums.

Good luck!!!!