Xuups
Get an account!     Login

Utilities

Main menu

Who's Online

28 user(s) are online (4 user(s) are browsing Forum)

Members: 0
Guests: 28

more...

Get Xoops

Support Xuups Project


Browsing this Thread:   1 Anonymous Users





passing variable to theme
Just popping in
Joined:
2009/1/8 23:05
Group:
Registered Users
Posts: 9
Offline
Hi Trabis
i used $siteurl = $_REQUEST['site'], (all ok)
then used $xoopsTpl->assign('siteid', $siteurl); in index.php - but it seems in icms it doesnt call header.php in index.php before it redirects.

Any other suggestions?

Cheers
Tony

Posted on: 2009/12/21 15:08
Transfer the post to other applications Transfer


Re: passing variable to theme
Moderator
Joined:
2008/4/7 0:30
From Portugal
Group:
Webmasters
Registered Users
Posts: 303
Offline
Well, I don't remember you telling that it would redirect!!
If it redirects to module then the assign to template must be in module. I imagine this is a problem if you are using different modules for each redirect. I would create $_SESSION['myvar'] = $myvar; in index.php and then grab it in file footer.php at the very top with $xoopsTpl->assign('myvar', $_SESSION['myvar']);

Posted on: 2009/12/22 14:05
_________________
TDM
Transfer the post to other applications Transfer


Re: passing variable to theme
Just popping in
Joined:
2009/1/8 23:05
Group:
Registered Users
Posts: 9
Offline
Hi Trabis
THis didnt work for me either - tired to acces the code in the theme with <{xoopsTpl['siteurl']}>

I am only using one theme by the way and only redirects to the same module - modules/tinyd1/index.php?id=1

Thanks for your advice.
Regards
Tony


Posted on: 2009/12/23 2:20
Transfer the post to other applications Transfer


Re: passing variable to theme
Moderator
Joined:
2008/4/7 0:30
From Portugal
Group:
Webmasters
Registered Users
Posts: 303
Offline
You should get it in the theme with <{$siteurl}>.
It would be easy if you post the code you are using.

Posted on: 2009/12/23 19:54
_________________
TDM
Transfer the post to other applications Transfer


Re: passing variable to theme
Just popping in
Joined:
2009/1/8 23:05
Group:
Registered Users
Posts: 9
Offline
Sorry - had to work on another project - I still cant get this variable to work - I hav einstalled XOOPS on teh site and am trying that now
at the top of index.php I have
$siteurl = "1234";
$_SESSION['siteurl'] = $siteurl;
echo "INDEX=".$siteurl;

and of course it echos ok.

at the top of footer.php I have

$xoopsTpl->assign('siteurl', $_SESSION['siteurl']);
echo "FOOTER=".$_SESSION['siteurl'];

This is not happenign so footer is not being called by the look of it

in theme I am using

The site is <{$siteurl}>.
<{php}>
print_r($_SESSION);
<{/php}>

I am not sure why footer is not being called.

I can give you ftp details if youwant to test this out

ANy more ideas?

Cheers
Tony

Posted on: 2010/1/15 13:55
Transfer the post to other applications Transfer


Re: passing variable to theme
Just popping in
Joined:
2009/1/8 23:05
Group:
Registered Users
Posts: 9
Offline
OK footer appearing now ONLY when logged in but blank as the session variable is not been set.
Added session_start to index and footer and got it working sproadically but would show as NOT logged in

Cheers
Tony

Posted on: 2010/1/15 14:06

Edited by tayling on 2010/1/15 14:24:26
Transfer the post to other applications Transfer


Re: passing variable to theme
Just popping in
Joined:
2009/1/8 23:05
Group:
Registered Users
Posts: 9
Offline
hi Trabis
Have cleared out everythign and started again
footer.php has
$xoopsTpl->assign('siteurl', $_SESSION['siteurl']); at top
common.php $_SESSION['siteurl'] = $_REQUEST['siteurl'] on the bottom

All working nicely in xoops but not at all in impresscms - am converting back to xoops
cheers
Tony

Posted on: 2010/1/17 12:31
Transfer the post to other applications Transfer


Re: passing variable to theme
Just popping in
Joined:
2014/9/24 13:07
From usa
Group:
Registered Users
Posts: 1
Offline
I have seen in xoops.org that you was trying to hack user uid
to show something like xuups.com/users/admin
or xuups.com/admin

I just want to know whether you found a good hack.
Please let me know because i am very interested.

Posted on: 2014/9/24 13:29
_________________
zoha
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


 

Login

Username:

Password:

Remember me



Lost Password?

Register now!

Ajax Search


Advanced Search

Newest Posts