1
sigkill
A link to switch to an other template
  • 2004/3/5 23:06

  • sigkill

  • Just popping in

  • Posts: 2

  • Since: 2004/3/5 2


I want to create a link on my top theme banner to switch to an other template for example x2t. I tried to make a link in my theme.html (a file in html/themes/my_theme/):

but it doesn't work.
Has anyone an idea about how to do this?
Thanks for your help...

2
Mithrandir
Re: A link to switch to an other template

Theme or template?

XOOPS expects theme changes to come via the POST method with a variable called "xoops_theme_select"

So either you should edit the include/common.php lines 198 and onwards or change the link to a button, which sends the theme as value for "xoops_theme_select" through POST.

3
DobePhat
Re: A link to switch to an other template
  • 2004/3/12 6:48

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


Hey there, I just saw this post and thought to myself that would be a good idea for me to do as well...

I want to for example, to have a graphic button..(2 in this case) to switch from a fixed width or dyamic width theme (which is the solution I finally came up with on my indecision for which to use for our site...LOL)

Mith:
You mentioned to use the XOOPS theme select variable...
(and to have it as a form element? ), post..etc...?!

er...I think I'm following but can you share an example when you get a chance?

Thanks!

4
carnuke
Re: A link to switch to an other template
  • 2004/3/12 7:32

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


You may want to look at this site HERE to see the code they use to change themes from links (links are at the top) The theme is downloadable on registration.

Richard

5
DobePhat
Re: A link to switch to an other template
  • 2004/3/12 15:57

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


perfect, thanks!

6
DobePhat
Re: A link to switch to an other template
  • 2004/3/12 16:22

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


DOH!

Thats just a style sheet switcher isn't it?
Im looking for to switch whole theme...just like you would with dropdown but as a button rather than dropdown...

I know this is possible...
Sorry if I seem lazy right now!

OH ALRIGHT Ill GET THIS PARTY STARTED



Quote:


<{$block.theme_select}>




The above is the code for the theme block....
so Im assumming we reblace Block.theme_select with the actual theme path? But how do we find that theme path?

am I at least close!
Thanks all!

7
carnuke
Re: A link to switch to an other template
  • 2004/3/12 17:05

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


Sorry ... I didn't try the download. I like your idea, so Im going to experiment some more

8
DobePhat
Re: A link to switch to an other template
  • 2004/3/14 19:48

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


Ok maybe it's a dumb idea after all...I Mean the dropdown menu is fine...

I got this far...









This of course is wrong...

9
Mithrandir
Re: A link to switch to an other template

try this:
<div style="text-align: center;">
<
form method="post">
<
input type="hidden" name="xoops_theme_select" value="teatro">
<
input type="submit" value="ChangeThemeToTeatro">
form>
div>

10
DobePhat
Re: A link to switch to an other template
  • 2004/3/17 6:26

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


I Imagine thats rather close to what we need,

the problem is we need index.php to be called somewhere I believe...so basically what we have here is a basic structure...but something is missing...
Hmmmm
will keep trying...

Thanks!

Login

Who's Online

361 user(s) are online (51 user(s) are browsing Support Forums)


Members: 0


Guests: 361


more...

Donat-O-Meter

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

Latest GitHub Commits