Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
3 + 6 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: is_home ==1 and is_module=="modulename"
by Kumar on 2007/6/14 17:21:14

Thank you verymuch rplima2004 & Dave_L for the quick and easy solution. Both methods works fine.
Re: is_home ==1 and is_module=="modulename"
by Dave_L on 2007/6/14 12:22:56

What about using
le="color: #000000"><?php <{$xoops_dirname}>
?

le="color: #000000"><?php <{if $xoops_dirname == 'system'}> ... in system module ... <{else}> ... in another module ... <{/if}>


You could parse
le="color: #000000"><?php <{$xoops_requesturi}>
if you need more specific information.
Re: is_home ==1 and is_module=="modulename"
by rplima2004 on 2007/6/14 12:16:02

hi Kumar

I make this placing the code below in the end of the file header.php

le="color: #000000"><?php if (!strstr( $_SERVER['PHP_SELF'],'/modules/') || strstr( $_SERVER['PHP_SELF'],'/modules/') == ''){ if ($_SERVER['PHP_SELF'] == '/index.php' /*|| $_SERVER['PHP_SELF'] == '/sub_dir/index.php'*/){ //If your site is in a subdomain, uncomment the code to the side and changes the word "sub_dir" for the name of the directory where its site is #You are in home $xoopsTpl->assign( 'xoops_ishome', true ); }else{ #You aren't in home however isn't in no module $xoopsTpl->assign( 'xoops_ishome', false ); } }else{ #You are in some module $xoopsTpl->assign( 'xoops_ishome', false ); $xoopsTpl->assign( 'xoops_ismodule', true ); }


Make tests and sees if this helps you

[]s
is_home ==1 and is_module=="modulename"
by Kumar on 2007/6/14 11:40:18

How can i add two smarty variables that checks whether it is on home page or on a module page.
I have added the following code to header.php
le="color: #000000"><?php $xoopsTpl->assign( 'xoops_ishome', !empty($aggreg->blocks['page_topcenter']) || !empty($aggreg->blocks['page_topleft']) || !empty($aggreg->blocks['page_topright']) );

and placed $xoopsOption['ishome'] =1; in index.php. and used the following code in theme.html
le="color: #000000"><?php <{if $xoops_ishome ==1}> ...... <{/if}>

It worked fine but failed when there is call to header file from modules.

Is there any good solution to check this?
Thanks

Who's Online

196 user(s) are online (159 user(s) are browsing Support Forums)


Members: 0


Guests: 196


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits