How to override all users theme selection

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   How to override all users theme selection
lumax
CZ Super Newbie
usa.gif alaska.gif
Gender: Male
Status: Offline
Joined: Nov 14, 2003
0.01 posts per day
Posts: 60
Points: 3,953
   
Im moving users to a new nuke with fewer themes and want to know a quick and dirty way of overriding their theme selection.




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
Run it in phpmyadmin,

UPDATE nuke_users SET theme='';
OPTIMIZE TABLE nuke_users;




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: How to override all users theme selection
scz74
CZ Active Member
scz74 has been a member for over 20 year's 20 Year Member
philippines.gif
Age: 50
Gender: Male
Website:
Status: Offline
Joined: Aug 15, 2004
0.02 posts per day
Posts: 145
Points: 7,972
   
hey telli, if i ran that code in phpadmin would it lock the theme to the admin theme selection? meaning only the theme that is chosen by admin will be available disabling users choice to themes?



Back to top Reply with quote
#4   re: How to override all users theme selection
Dauthus
CZ Addict
 Codezwiz Site Donator
Dauthus has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 61
Gender: Male
Website:
Status: Offline
Joined: Mar 17, 2004
0.06 posts per day
Posts: 426
Points: 15,917
   
Not to speak for Telli, but I think this would only cause every member's theme to change to the theme chosen in the admin => preferences portion of the site. If you still have more than one theme, members will still be able to change themes by going into their account and changing their theme there.

I only know of two ways other than using a "your_account" addon to fix this after you run the database update.

1. Open modules/Your_Account/navbar.php and look for the following line of text and comment it out:

if ($thmcount > 1) {
   $menuimg = menuimg("themes.gif");
   echo "<td width=\"10%\"><font class=\"content\">"
       ."<center><a href=\"modules.php?name=Your_Account&amp;op=chgtheme\"><img src=\"$menuimg\" border=\"0\" alt=\""._SELECTTHETHEME."\" title=\""._SELECTTHETHEME."\"></a><br>"
       ."<a href=\"modules.php?name=Your_Account&amp;op=chgtheme\">"._SELECTTHETHEME."</a>"
       ."</center></form></font></td>";
    }


Change to:

//if ($thmcount > 1) {
   //$menuimg = menuimg("themes.gif");
   //echo "<td width=\"10%\"><font class=\"content\">"
   //    ."<center><a href=\"modules.php?name=Your_Account&amp;op=chgtheme\"><img src=\"$menuimg\" border=\"0\" alt=\""._SELECTTHETHEME."\" title=\""._SELECTTHETHEME."\"></a><br>"
   //    ."<a href=\"modules.php?name=Your_Account&amp;op=chgtheme\">"._SELECTTHETHEME."</a>"
   //    ."</center></form></font></td>";
    //}


OR

2. Change the modules/Your_Account/navbar.php so the theme count is equal to the number of themes you have on your site, so the themes icon won't show up. In other words if you have 6 different themes installed, change the number to 6. Just remember if you add themes, you will need to update the number. This lets you have numerous themes, but your members to only use the default theme the admin uses. Example below:

if ($thmcount > 1) {
   $menuimg = menuimg("themes.gif");


Change to:

if ($thmcount > 6) {
   $menuimg = menuimg("themes.gif");




_________________
[ Register or login to view links on this board.]
Vivere disce, cogita mori
Back to top Reply with quote
#5   re: How to override all users theme selection
scz74
CZ Active Member
scz74 has been a member for over 20 year's 20 Year Member
philippines.gif
Age: 50
Gender: Male
Website:
Status: Offline
Joined: Aug 15, 2004
0.02 posts per day
Posts: 145
Points: 7,972
   
hey dauthus, thanks for the fix. its exactly what i was looking for. icon_smile.gif



Back to top Reply with quote
#6   re: How to override all users theme selection
lumax
CZ Super Newbie
usa.gif alaska.gif
Gender: Male
Status: Offline
Joined: Nov 14, 2003
0.01 posts per day
Posts: 60
Points: 3,953
   
I need a fix to ovveride the forum template selections in my users - anyone got an idea there?




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum