Skip to content

Author: admin

How to check shutter (shots) count on your photo camera?

Visit: http://regex.info/exif.cgi/ and http://scent.org/cgi-bin/exif.cgi
Just choose the image from your computer or URL and check the info. You can check a lot of Exif info from your image taken from shutter speed, aperture, ISO, shutter count and so on.

I have tested the first link for my Nikon D90 and it works.

Alternatively you can install a software called Opanda and check this info on your PC – http://www.opanda.com/en/iexif/download.htm

How to add extra sidebar to a WordPress theme?

To begin the tutorial, extract your theme into a folder and open it to see all the files. If your theme has only one sidebar, then most probably you will NOT find a file called functions.php in your theme folder. In that case you will have to create this file yourself. Just open notepad or any other code editor to start a new file. Put this code into that file:

Problem with category slug renaming in WordPress

I had a problem. I couldn’t change the category slug in some of my categories. So I found the solution at:

http://wordpress.org/support/topic/category-slug-cant-be-updated

The problem comes from the fact that the tags and categories are stored in the same table in the database. And the tags also have slugs. So if there is already a tag with the slug that you want to put in the category you can’t do it until you delete the tag or change it’s slug.

You just need to go to the tags table in the admin panel and change the tag slug that’s making the problem.

Standart banner sizes

Name Width / px Height / px Aspect ratio
Rectangles and Pop-Ups
Medium Rectangle 300 250 1.2
Square Pop-Up 250 250 1
Vertical Rectangle 240 400 1.67
Large Rectangle 336 280 1.2
Rectangle 180 150 1.2
3:1 Rectangle 300 100 3
Pop-Under 720 300 2.4
Banners and Buttons
Full banner 468 60 7.8
Half banner 234 60 3.9
Micro bar 88 31 2.84
Button 1 120 90 1.33
Button 2 120 60 2
Vertical banner 120 240 2
Square button 125 125 1
Leaderboard 728 90 8.09
Skyscrapers
Wide skyscraper 160 600 3.75
Skyscraper 120 600 5
Half page ad 300 600 2

Sizes in bold are part of the IAB’s Universal Ad Package.

For more info go to:

http://www.bannercreator.nu/banner-size.html

http://en.wikipedia.org/wiki/Web_banner

How to remove “View Full-Size Image” text link in Virtuemart product description?

One way to remove the text “View Full-Size Image” from beneath your product thumbnail on your flypage, make a copy of, then edit this file:

components/com_virtuemart/themes/your_theme/theme.php

Find the function vmBuildFullImageLink and within that find this line:

Code: [Select]
$text = ps_product::image_tag($product['product_thumb_image'], $img_attributes, 0)."<br/>".$VM_LANG->_('PHPSHOP_FLYPAGE_ENLARGE_IMAGE');

Change it so it looks like this:

Code: [Select]
$text = ps_product::image_tag($product['product_thumb_image'], $img_attributes, 0);

Save and test.

Another method would be to clear out the ‘PHPSHOP_FLYPAGE_ENLARGE_IMAGE’ text in your langauge file.

Using the Page Class Suffix in Joomla templates and components

Load Suffix

First, we need to find out what the page class suffix is for the page we are visiting. To do this, you will need add some code to your template:

  1. Open your template’s index.php file (located in /templates/*template-name*/)
  2. Find the <head> tag in the index.php, near the top area of the template
  3. Above this, insert one of the following code blocks (Either of the following options will work fine in most cases. However they work slightly differently, so in certain cases your needs may dictate a specific choice.)

By Itemid

To load the page class suffix associated with the current Itemid, add this to the top of the index.php file:

<?php
  $itemid = JRequest::getVar('Itemid');
  $menu = &JSite::getMenu();
  $active = $menu->getItem($itemid);
  $params = $menu->getParams( $active->id );
  $pageclass = $params->get( 'pageclass_sfx' );
?>

By Active Menu Item

To load the page class suffix associated with the active menu item, add this to the top of the index.php file: (For sub-pages with no active menu item, this will load the page class suffix for the default menu item.)

<?php
   $menus      = &JSite::getMenu();
   $menu      = $menus->getActive();
   $pageclass   = "";

   if (is_object( $menu )) :
   $params = new JParameter( $menu->params );
   $pageclass = $params->get( 'pageclass_sfx' );
   endif; 
?>

(credit: Page Class Suffix in template code)

Security

You should always use htmlspecialchars() in your code before writing something into an HTML attribute, else you open up an attack vector to inject script code into your page.

Insert Suffix

The next step is to use the page class suffix somewhere in the template.

In the Body Tag

The more common method would be to apply the page class suffix as an id or class to the <body> tag. Find the <body> tag (below the </head> tag) and replace it with this:

<body id="<?php echo $pageclass ? htmlspecialchars($pageclass) : 'default'; ?>">

To Load a Page-Specific Stylesheet

The second method would be to load a stylesheet unique to the page in question. Instead of modifying the <body> tag, look for the stylesheet link within the <head></head> tags and add the following line directly beneath it:

<link rel="stylesheet" href="templates/<?php echo $this->template ?>/css/<?php echo htmlspecialchars($pageclass) ?>.css" type="text/css"/>

For more info: http://docs.joomla.org/Using_the_Page_Class_Suffix_in_Template_Code

Joomfish language code tricks

Of course Joom!Fish has no competitors in providing multilanguage solutions for Joomla! But what we always wanted to achieve is to give more and more power to the administrators. And these people care about design, images, language dependents modules and such stuff.

We had some nice tricks with Joom!Fish 1.8.x, but I will provide you now some nice advanced features in respect to the design posibilities with Joom!Fish in terms of different visualisation of your web site in different languages.

As usual, there is no other alternative in the Joomla! multilanguage world to what we offer. Check out our design tricks coming with Joomla! 1.5 and Joom!Fish 2.0.

Note: these tricks require intermediate knowledge in Joomla! and might not be easy to implement for a new users.

 

Load different CSS file, based on the language.

Place this instead of the default load of a CSS file:

<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/<?php echo $this->language ?>.css" type="text/css" />

Now name your CSS files like en-GB.css or bg-BG.css or de-DE.css or whatever language you use.

 

Want to display certain module position only into one language?

Add this to the correct place in you template:

<?php
 if ($this->language=="de-de") {
 ?>
 <jdoc:include type="modules" name="germanmoduleposition" />
<?php } ?>

Now you should place the modules that you want to appear only into the template position named germanmoduleposition.

 

Load different image with the different languages.

Lets imagine you have an image named logo.gif that is the logo of your site. But you want to use different logo for each language.<br /><br />On default the logo will be called with the following command in your template (if it is not called via the CSS):

<img src="/<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/logo.gif" width="260" height="180" alt="Logo" />

Or at least it should be something similar.
Now in order your logo to change with the languages, you need to do replace the following code with:

<img src="/<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/<?php echo $this->language ?>.gif" width="260" height="180" alt="_?php echo JText::_('Logo'); ?>" />

What else you have to do is to name your logo images for the different languages en-GB.gif, bg-BG.gif etc.
You also need to add the language definition of the alt text. Lets imagine your template is named nice_template. If it is 1.5 compatible should have a language file under language/en-GB/en-GB.tpl_nice_template.ini

Add at the bottom of this file:
LOGO=Logo

Add the same line for the translation file of each language you use (i.e.
language/de-DE/de-DE.tpl_nice_template.ini : LOGO=Logo German)

For more info: http://www.joomfish.net/en/documentation/joomfish-20/25-tips/90-language-dependent-design-of-course-with-joomfish-only

HTML javascript popup window

This is the code:

<a onclick="window.open(this.href,'win2','width=400,height=350,menubar=yes,resizable=yes'); return false;" title="Your Title" href="yourlink.com">some text</a>