TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

June 26, 2024, 01:24:05 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,280
  • Total Topics: 21,227
  • Online today: 203
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 195
  • Total: 195

Theme Selector redirection

Started by WebMasterZ, November 06, 2005, 01:22:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WebMasterZ

Hi Bloc
great portal running .75 and its sweet  :)

Just a quick question
If I change theme using the theme selector here no problems (?action=forum;theme=)

If a registered user on my board changes theme it takes them to there profile (?action=profile;sa=theme)


snork13

I get the same thing for what it is worth!


-snork

bloc

Yes..working on it. Basically if a user changes theme, it changes permanent, but for a guest it doesn't. And the function to change permanent is usually done in the profile.

WebMasterZ

Thats fine Bloc

How about if for registered users it changed it for the current session only and the button said something like Preview with a bubble to advise registered users to change in there profile to make it permanent ?

feline

Hello,

i have created a 'inside php' article for change themes temporary .. (while session id is valid). It works for all users ...
global $context, $settings, $options, $txt, $scripturl, $modSettings, $user_info;

$request = db_query("SELECT ID_THEME, value
  FROM smf_themes WHERE variable = 'images_url' order by ID_THEME",  __FILE__, __LINE__);

$themes = array();
while ($row = mysql_fetch_assoc($request))
  $themes[$row['ID_THEME']] = $row['value'];

mysql_free_result($request);

$action = '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST">';
$i=0;

echo '<br><div class="catbg2"><center>Hier kannst du dein Design auswÃÆ'Ã,¤hlen, indem du auf das Vorschaubild klickst</center></div><br>
<table border="0" width="99%" align="center"><tr>';

foreach ($themes as $id => $theme) {
  if ($i == 4) {
    echo '</tr><tr height="30"><td colspan="4"></td></tr><tr>';
    $i = 0;
  }
  echo $action . '<td width="30"></td><td><input type="hidden"
   name="theme" value="'. $id .'">
  <input type="image" src="' . $theme . '/thumbnail.gif"
   onclick="submit()"></form></td><td width="30">';
  $i ++;
}

echo '</tr></table><br><div class="catbg2"></div>';


Test it  ;)

Fel

bloc