21
Tarik
Re: Block on a specific page
  • 2010/10/28 23:25

  • Tarik

  • Not too shy to talk

  • Posts: 170

  • Since: 2010/2/3 1


like @ghia said you must not write the domain
<{if $smarty.server.PHP_SELF!='/modules/ ... index.php?wfc_cid=2'}>
   <{
$xoops_block_89.content}>
<{/if}>

22
alleymize
Re: Block on a specific page
  • 2010/10/29 17:51

  • alleymize

  • Just popping in

  • Posts: 17

  • Since: 2008/1/25


Ok, I have placed this at the top of the wfchannel index template page but it still has the block on the page. Here is the code I am inserting:

<{if $smarty.server.PHP_SELF!='/modules/wfchannel/index.php?wfc_cid=2'}>
<{$xoops_block_89.content}>
<{/if}>


Not sure what I am doing wrong.

23
Tarik
Re: Block on a specific page
  • 2010/10/31 22:38

  • Tarik

  • Not too shy to talk

  • Posts: 170

  • Since: 2010/2/3 1


Sorry for the late response,
after some searchs i found that "$smarty.server.PHP_SELF" the absolute location from the root of the website - not the root of xoops but the root of the host folder
to have an example of it put - in local of course -
<{$smarty.server.PHP_SELF}>
in the theme.html file and see what it give for the page you want
EX for my local
/~amine/htdocs/modules/wfchannel/index.php?wfc_cid=2

so for me i must put
<{if $smarty.server.PHP_SELF!='/~amine/htdocs/modules/wfchannel/index.php?wfc_cid=2'}><{$xoops_block_89.content}> <{/if}>

if it work do the same trick to your website

24
alleymize
Re: Block on a specific page
  • 2010/11/2 17:22

  • alleymize

  • Just popping in

  • Posts: 17

  • Since: 2008/1/25


Ok so when I put the code in my theme file and uploaded and visited the same page it shows this:

/modules/wfchannel/index.php

but it is missing the extra ?wfc_cid=2

Should I not include this? Because I did try and include everything above and the block still shows.

25
ghia
Re: Block on a specific page
  • 2010/11/3 6:33

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
Ok so when I put the code in my theme file and uploaded and visited the same page it shows this:
You mean this code?
<{$smarty.server.PHP_SELF}>

Then you should specify:
<{if $smarty.server.PHP_SELF!='/modules/wfchannel/index.php'}>
  <{
$xoops_block_89.content}>
<{/if}>


26
alleymize
Re: Block on a specific page
  • 2010/11/3 9:48

  • alleymize

  • Just popping in

  • Posts: 17

  • Since: 2008/1/25


Ok, and I have pasted this into the top of my wfchannel_index.html and it still does nothing. I don't understand what is wrong.

27
ghia
Re: Block on a specific page
  • 2010/11/3 11:32

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
wfchannel_index.html
???
Is that your theme file?

28
alleymize
Re: Block on a specific page
  • 2010/11/3 13:16

  • alleymize

  • Just popping in

  • Posts: 17

  • Since: 2008/1/25


No that is the main index file for the channel that the page is in that I don't want the block to show on. Should it be in my theme file instead for the whole site?

29
alleymize
Re: Block on a specific page
  • 2010/11/3 13:29

  • alleymize

  • Just popping in

  • Posts: 17

  • Since: 2008/1/25


I tried placing it in my main theme file for the site and the same result, nothing is changed.

Here is the code I am pasting:
<{if $smarty.server.PHP_SELF!='/modules/wfchannel/index.php'}>
<{$xoops_block_89.content}>
<{/if}>

89 is a custom block I have, so I changed it to one for the user block and it is still there no matter.


30
ghia
Re: Block on a specific page
  • 2010/11/5 1:55

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


If you add
<{$xoops_block_89.content}>
<{
$xoops_block_89.content}>

do you see the block twice?

Login

Who's Online

321 user(s) are online (224 user(s) are browsing Support Forums)


Members: 0


Guests: 321


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits