11
Mithrandir
Re: Changing Theme Hack

Sure, it works But if you navigate through the news navigation, you will not get the theme changing

As far as I can see, mine will (But I really cannot be arsed to test it - That's for the recipient to do )

If there is a big demand for this, I may put it in as a feature in the News module v1.4

12
JackJ
Re: Changing Theme Hack
  • 2004/5/1 14:29

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


Sounds like a great addition

Results of trying it out.

I click on change theme in the theme changing block
Theme changes and goes to the chosen news category
I navigate throughout the whole site--theme stays changed :)

13
Mithrandir
Re: Changing Theme Hack

Yes, but I meant that e.g. you select the "newOne" theme and theme changes to "newOne" and you go automatically to topic 1.

You then select the "oldTwo" theme, and the theme changes to "oldTwo" theme and you go to topic 2

If you then go to topic 1 through the normal navigation, you are still in "oldTwo" theme and not in "newOne", which is the theme for this topic.

14
JackJ
Re: Changing Theme Hack
  • 2004/5/1 15:33

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


I see what you mean, if you want each theme change related to a different news category, as opposed to one news category.

your brilliant..

15
Wilco
Re: Changing Theme Hack
  • 2004/5/5 17:59

  • Wilco

  • Friend of XOOPS

  • Posts: 49

  • Since: 2004/4/27


JackJ,

However you tried your suggestion, it didn't work for me. I don't know why, nothing happened after I edit system_block_themes.html.
Besides that I wonder if your solution is the right one. I don't see how the suggested code can bind a theme to a newstopic-category. Is there something that I don't get?

16
Mithrandir
Re: Changing Theme Hack

did you modify it through the admin menu? Or directly in the file and then uploaded it?

If you did the latter, you should update the system module in order for the updated template to be put in the database.

JackJ's suggestion doesn't bind a theme to a news topic, but it does go to the news topic, when you change the theme.

I still think my suggestion is better (but do set the $xoopsOption['theme_set'] BEFORE include XOOPS_ROOT_PATH."/header.php";)

17
Wilco
Re: Changing Theme Hack
  • 2004/5/5 19:37

  • Wilco

  • Friend of XOOPS

  • Posts: 49

  • Since: 2004/4/27


Mithrandir,
I edited the file directly and didn't realise I should update the system module WHAAAH

I tried your solution before and there also nothing happened. Now I can try both again and choose the one that best fit.

About JackJ's suggestion: I still do not see how changing to theme B the newscategory changes to news topic 1 and changing to theme C the newscategory changes to news topic 2 and so on...

18
Wilco
Re: Changing Theme Hack
  • 2004/5/5 21:03

  • Wilco

  • Friend of XOOPS

  • Posts: 49

  • Since: 2004/4/27


I feel dumb!
Jack's solution does work but I can only give one topic id, so no matter what, when I navigate through the theme changing block, I always see the news related with the defined topic id.

Mithrandir's solution is a problem for me.... Let me put the suggested code here related to the rest of the code...
I put the code in de /modules/news/index.html file


Quote:

include '../../mainfile.php';
$xoopsOption['template_main'] = 'news_index.php';
$xoopsOption['theme_set'] = 'what do i put here?';
include XOOPS_ROOT_PATH.'/header.php';
include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';

switch($xoopsOption['storytopic']) {
case '21': //if it is topic with id 21
$xoopsConfig['theme_set'] = "Bredervoort";
break;

case '22': //if it is topic with id 22
$xoopsConfig['theme_set'] = "Commujon";
break;
}

if (isset($HTTP_GET_VARS['storytopic'])) {
$xoopsOption['storytopic'] = intval($HTTP_GET_VARS['storytopic']);
} else {
$xoopsOption['storytopic'] = 0;
}
etc...........


I updated the newsmodule and nothing changed with the displayed news topics when I navigate through the theme changing block.

As I said: I feel dumb

19
Mithrandir
Re: Changing Theme Hack

I hope you mean modules/news/index.php

Let's say that you have the default theme as .. erhm.. default.

If you in the index.php write:
$xoopsOption['theme_set'] = "phpkaox";

it should change to phpkaox, whenever you go to news. Not by using the theme selector, but by going to the news module

20
Wilco
Re: Changing Theme Hack
  • 2004/5/6 6:35

  • Wilco

  • Friend of XOOPS

  • Posts: 49

  • Since: 2004/4/27


Yes, I meant the index.php ...
Ok I changed to $xoopsOption['theme_set'] = "Infonet";

Unfortunaly it still does not work for me. Did I put the rest of suggested code at the right spot?

Login

Who's Online

116 user(s) are online (74 user(s) are browsing Support Forums)


Members: 0


Guests: 116


more...

Donat-O-Meter

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

Latest GitHub Commits