if component..

Joomla 1.5 - Make an "if" statement based on the component loading at one time

, on October 27, 2008 Add new comment

For some reason, selecting on what pages to show a block from admin doesn't work all the times.

Example, i wanted the breadcrumb module to show only on the gallery(rsgallery2), but selecting the gallery from "Menu Assignment" in mod_breadcrumbs settings worked only for the first page of the gallery, and not for the rest of the pages in gallery.

This is what i have done in the index file of the theme:

Read more »

javascript, jQuery, Mootools, Prototype

Make jQuery work on the same page with Mootools and or Prototype

, , , on June 25, 2008 1 comment
Make jQuery work on the same page with Mootools and or Prototype

Some conflicts appear when using jQuery javascript library with Motools or Prototype on the same page. A workaround is using noConflict mode for jQuery.

Follow these steps:

1. Download the latest version of jQuery

2. Download jQuery compat

3. Open jquery.js, go to the end of the file and add this line jQuery.noConflict();

Read more »

Safari ways

CSS hack for Safari

, on June 08, 2008 Add new comment

Generally Safari browser print a website layout the way i want. Some times thou, it won't do it as Firefox do.

This is an example hack for Safari. The css class inside @media screen and (-webkit-min-device-pixel-ratio:0){} will be read only by Safari. So, in Firefox the object that user this class will have a padding-left of 10px and in Safari i canceled the 10px padding by defining a new value (padding-left: 0px;)

Read more »

vbulletin

Add a linkedin field to vbulletin user profile

, on May 13, 2008 Add new comment

A few days ago i added a new option to the user profiles in a vbulletin forum ( seo-romania.com/forum ). This option let the users have on their postbit a link to their http://linkedin.com profile.

It's simple to achieve this, just follow the next steps:

1. Go to admincp -> User Profile Fields -> Add New User Profile Field

Read more »

Joomla 1.5

Joomla 1.5 - add a new module position inside an article

, on May 11, 2008 16 comments

Today i received a request to insert a new module position inside the article template of a joomla website. The client wanted to print an adsense module in that position. You can see the result in the image below.



To do this, you need to define a new position first, so go to /templates/your_template. Open the templateDetails.xml file and search for <positions> Add a new position, something like <position>adsense_in_content</position>.

Save the file, and upload it back to it's place.

Read more »

linux stuff

Server admin stuff

on May 03, 2008 Add new comment

Server reboot commands:

  • shutdown -r now - Reboot ("safe" - runs the init scripts associated with the shutdown process)
  • shutdown -nr now - Reboot ("forced" - skips the init scripts - use of this command option is not recommended, as it may affect database integrity and cause other errors)
  • shutdown -h now - Halt the VPS (equivalent to a "safe" shut down)

Logs (cPanel/WHM):

Read more »

jcarousel

Drupal - Jcarousel and views

, , on March 24, 2008 2 comments

Adding a Jcarousel effect to a <ul> of a block view.

Install jquery_update module.

Download Jcarousel. Unzip to theme folder.

Create a block view, than publish it.

Add this snippet inside the <head> part of page.tpl.php:

Read more »

hide it

Drupal - Hide a block for a specific node type

, on March 16, 2008 3 comments

I needed to hide a block for a certain node type on a drupal driven website so i found this snippet on drupal.org. I will post it here for my future needs.

Paste this in "Page specific visibility settings" tab on the block you want to hide. Select "Show if the following PHP code returns TRUE (PHP-mode, experts only)." first.

Read more »

tables

Hide table border in Firefox

on March 14, 2008 7 comments

I have made abuse of tables on one recent project and the problem that toke me some time to figure it out was how to hide the top table border that still appeared in Firefox even that the table had border="0" attribute or border: 0; in CSS.

Anyway, to solve this problem i added this line in the css file:

table {
border-collapse: separate;
}

This is a reminder to myself.. so i won't waste time next time searching for clues on how to handle table borders in Firefox.

Read more »

nicer

Style a search form with CSS

, on March 07, 2008 Add new comment

Ok, so i have to add some more focus on the search form on a Simple Machine Forum search form. The users seems not to take into account this option, so as a result a lot of duplicate topics appear daily.

This is how the search form looks right now (it's the default theme with some colors changed).

I want it to be wider as the forum is and with some style applied on it.

First, i will remove the lines (from 298 to 302) regarding the news field, which i will not use from the Themes/default/index.template.php :

	if (!empty($settings['enable_news']))
		echo '
				<td width="90%" class="titlebg2">
					<span class="smalltext"><b>', $txt[102], '</b>: ', $context['random_news_line'], '</span>
				</td>';

than add to the first td line which include the search form a colspan="2" attribute so it will become

Read more »