1
xfranc
Adding Xoops variables to a block
  • 2006/1/30 14:00

  • xfranc

  • Just popping in

  • Posts: 22

  • Since: 2005/8/4 1


Hi all,

I want to put this :

<{if $xoops_isuser}> Welcome
<a href="<{$xoops_url}>/user.php"><{$xoops_uname}></a>. <{else}> 
            
Welcome GuestPlease 

<a href="<{$xoops_url}>" onMouseOver='W.src="<{$xoops_imageurl}>register_mo.gif"' onMouseOut='W.src="<{$xoops_imageurl}>register.gif"'><img src="<{$xoops_imageurl}>register.gif" name="W"</a>


Into one of my center blocks, but it doesnt work and just shows the first row of code.

What am I doing wrong ? How do I get it to display the username or the register button ?

Any Help appreciated.

Thanks

2
msdana
Re: Adding Xoops variables to a block
  • 2006/1/30 14:59

  • msdana

  • Just can't stay away

  • Posts: 817

  • Since: 2005/12/11


Not for sure if this is correct, but it looks like you are missing the slash after <{$xoops_url}> in that line. Try this

<{if $xoops_isuser}> Welcome
<a href="<{$xoops_url}>/user.php"><{$xoops_uname}></a>. <{else}> 
            
Welcome GuestPlease 

<a href="<{$xoops_url}>" onMouseOver='W.src="<{$xoops_imageurl}>[color=CC0000]/[/color]register_mo.gif"' onMouseOut='W.src="<{$xoops_imageurl}>[color=CC0000]/[/color]register.gif"'><img src="<{$xoops_imageurl}>[color=CC0000]/[/color]register.gif" name="W"</a>


Hope that helps!
[size=x-small]If God is watching us, the least we can do is be entertaining.[/size]
Graphic Worx : Xoops Themes

3
xfranc
Re: Adding Xoops variables to a block
  • 2006/1/30 15:18

  • xfranc

  • Just popping in

  • Posts: 22

  • Since: 2005/8/4 1


Thanks for the reply.

Unfortunately im using this string in my HTML theme as well and the <{$xoops_imageurl}> is direct path.

Thanks.

4
Quest
Re: Adding Xoops variables to a block
  • 2006/1/30 16:03

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


You can't use smarty tags in custom block which is html. I believe they only work in the template files and theme. There may be a way to use PHP to use the smarty tags. You can find more information on it by searching using Custom Blocks.

Quest

5
allnewtome
Re: Adding Xoops variables to a block
  • 2006/1/30 23:33

  • allnewtome

  • Not too shy to talk

  • Posts: 175

  • Since: 2005/11/30


Quote:

Quest wrote:
You can't use smarty tags in custom block which is html. I believe they only work in the template files and theme.



You could maybe try this. Find a block you don't use, e.g. search, edit its template and replace its content with your code from above. Then make it the center block.

Or why not edit the login block's template, and set it to be on the centre? That might make more sense.

6
shank
Re: Adding Xoops variables to a block
  • 2006/1/31 3:52

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


Why not just code it into the theme?
s l s h a n k l e @ b e l l s o u t h . n e t

Login

Who's Online

187 user(s) are online (120 user(s) are browsing Support Forums)


Members: 0


Guests: 187


more...

Donat-O-Meter

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

Latest GitHub Commits