First lets install some plugin to show the latest tweets in wordpress. The plugin that I used is this one: http://wordpress.org/extend/plugins/twitter-for-wordpress/

You can use any plugin.

Install and put the widget in some position.

Here is an example of the output needed for the jQuery to work correctly:

<div>
    <p>A tweet is here</p>
    <p>Another tweet here</p>
    <!-- cont... -->
</div>

Read more…

{ 0 comments }

This is the sollution: http://forum.virtuemart.net/index.php?topic=66513.0

{ 0 comments }

How to determine if the user is viewing the front page

Joomla 1.0 Joomla 1.0

In Joomla! 1.0.x it was possible to determine if the user was viewing the front page by using code like this:

<?php
if ($option == 'com_frontpage' || $option == '') {
	echo 'This is the front page';
}
?>

Joomla 1.5 Joomla 1.5

But in Joomla! 1.5.x the com_frontpage component is no longer present. This is how to achieve the same result in Joomla! 1.5.x

<?php
$menu = & JSite::getMenu();
if ($menu->getActive() == $menu->getDefault()) {
	echo 'This is the front page';
}
?>

This works by checking to see if the current active menu item is the default one.

Joomla 1.6 Joomla 1.7 Joomla 2.5 Joomla 1.6, 1.7 and 2.5

This is one of the ways:

<?php if (JRequest::getInt('Itemid') == your_id) : ?>
         <!-- special javascript -->
<?php endif; ?>

There are some differences in 1.6/1.7/2.5 to avoid Strict Standards errors. Use the following code for a site where all content is in the same language:

<?php
$app = JFactory::getApplication();
$menu = $app->getMenu();
if ($menu->getActive() == $menu->getDefault()) {
	echo 'This is the front page';
}
?>

For multi-lingual sites the front page is dependent on the currently selected language, so you will need to use code like this:

<?php
$app = JFactory::getApplication();
$menu = $app->getMenu();
if ($menu->getActive() == $menu->getDefault( 'en-GB' )) {
	echo 'This is the front page';
}
elseif ($menu->getActive() == $menu->getDefault( 'fr-FR' )) {
	echo 'Accueil';
}
?>

For multi-lingual sites, it could also be necessary to display a specific code/html for all Default Home pages.

<?php $app = JFactory::getApplication(); ?>
<?php $menu = $app->getMenu(); ?>
<?php $lang = JFactory::getLanguage(); ?>
<?php if ($menu->getActive() == $menu->getDefault($lang->getTag())) : ?>
etc.

 

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

{ 0 comments }

A great plugin to add a sitemap to your WordPress site – HTML Page Sitemap

The only limitation is that it shows only pages, not posts.

{ 0 comments }

In wordpress 3.0 and above there is a nice build in menu. To create a drop down menu using this menu system follow there articles:

http://new2wp.com/pro/jquery-drop-down-menu-wordpress-3-menu/

http://wphacks.com/top-5-wordpress-navigation-menu-tutorials/

This is the main code in the CSS to achive the result:

#menu-header ul ul {
	display: none; /* For testing, change to display: block; */
	list-style:none;
	z-index:100;
}
#menu-header ul li:hover > ul {
	display: block;
}

{ 0 comments }

What Is ACTA ?

1 Feb ’12

in Other stuff

{ 0 comments }

To do this add another page template in your theme’s folder.

You could create a Page (Write > Write Page) called…,  that just uses a custom Page template implementing query_posts().

I do something similar on my site but don’t list every post! Just the categories with description and such. However, one can combine the idea of a Category Page with what I do on my ‘Archive’ Page:

Sometimes the  function wp_query(); brakes the pagination, so if this hapens use this code insted:

<?php $limit = get_option('posts_per_page');
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts('showposts=' . $limit . '&paged=' . $paged);
$wp_query->is_archive = true;
$wp_query->is_home = false; ?>

Notes:

$limit is assigned the ‘posts_per_page’ option from your WordPress settings, but can be changed to something else if you like:

$limit = 20;

These:

$wp_query->is_archive = true; $wp_query->is_home = false;

after the query_posts() are important as they force posts_nav_link() (and so pagination) to work, along with a few other helpful results gained for fooling WordPress into thinking we’re in the archive pages.

For the $paged stuff, see:
http://wordpress.org/support/topic/57912#post-312858

For more info: http://wordpress.org/support/topic/querying-all-posts

{ 0 comments }