Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Need help with a little script

Need help with a little script

HI,
I try to include a module before the "<h2>Title</h2>" and after the "<div id="ClassX">" but i can't get this to work. Anyone has an idea on how to do it?

Code:

if (!(JRequest::getVar('option') == 'com_content' && JRequest::getVar('view') == 'category' && JRequest::getVar('id') == '9' && JRequest::getVar('Itemid') == '101' && JRequest::getVar('limitstart') == '')) return;


if (preg_match('/(Google|Bing|Yahoo|MSN|Bot|Crawler)/i', $_SERVER['HTTP_USER_AGENT']))
{
  echo '<div id="Class1">'."\n";
return 136;
}
else
{
  echo '<div id="Class2">'."\n";
return 138;
}
?>
<h2>Title</h2>
<p>Some Text</p>
</div>

Outbreaker
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1694
Total Polls:
6
Total Posts:
5940
Posts this week:
4
User Info:
 
Total Users:
7290
Newest User:
pedengemma
Members Online:
0
Guests Online:
118

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked