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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,990
  • Total Topics: 21,323
  • Online today: 1,579
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 1239
  • Total: 1240
  • lurkalot

Removing Thumbnail in themes block

Started by sloopz, April 14, 2007, 05:26:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Horme Gaming

Hi,

How would I go about removing the thumbnail from a theme block so it only displays the theme list as a drop down.

thanks

Horme Gaming

sorry guys im bumping this as its been 5 days

Zetan

#2
You should find in each theme folder:
/images/thumbnail.gif

Rename each one to: /images/thumbnail2.gif

That way you will still have the thumbnail, but it won't display.

[Edit] Problem is, you'll have a red X in IE... The script that calls the thumbnail needs to be //commented out.
Not sure yet where that is.

Resident Geek

#3
He he he... I beat you this time Zetan.


themes/default/.TPortalBLocks.template.php

Find this code:

// remove multiple theme=x in the string.
$tp_where=preg_replace("'theme=[^>]*?;'si", "", $tp_where);

if(sizeof($temaid)>1){
        echo '<form name="jumpurl1" onSubmit="return jumpit()" style="padding: 0; margin: 0; text-align: center;">
<select style="width: 100%; margin: 5px 0px 5px 0px;" size="1" name="jumpurl2" onChange="check(this.value)">';
         for($a=0 ; $a<(sizeof($temaid)) ; $a++){
                echo '<option value="'.$temaid[$a].'" ', $settings['theme_id'] == $temaid[$a] ? 'selected' : '' ,'>'.substr($temanavn[$a],0,20).'</option>';
         }
         echo '</select><br /><input style="margin: 5px 0px 5px 10px;" type="button" value="'.$txt['tp-changetheme'].'" onClick="jumpit()">
<input type="hidden" value="'.htmlspecialchars($scripturl . '?'.$tp_where.'theme='.$settings['theme_id']).'" name="jumpurl3">
<div style="width: 95%; overflow: hidden;">
<img align="center" src="'.$settings['images_url'].'/thumbnail.gif" alt="" id="chosen" name="chosen"  />
</div>
</form>
                   <script type="text/javascript" language="Javascript">
var themepath=new Array()';
         for($a=0 ; $a<(sizeof($temaid)) ; $a++){
echo '
    themepath['.$temaid[$a].'] = "'.$temapaths[$a].'/thumbnail.gif"
';
}

echo '
function jumpit(){
                          window.location=document.jumpurl1.jumpurl3.value
                          return false
                       }
                   </script>
   <script type="text/javascript">
        function check(icon)
       {

document.chosen.src= themepath[icon]
document.jumpurl1.jumpurl3.value = \'' . $scripturl . '?'. $tp_where.'theme=\' + icon
       }
</script>';
}
else
echo $txt['tp-nothemeschosen'];
}


Replace with this:

// remove multiple theme=x in the string.
$tp_where=preg_replace("'theme=[^>]*?;'si", "", $tp_where);

if(sizeof($temaid)>1){
        echo '<form name="jumpurl1" onSubmit="return jumpit()" style="padding: 0; margin: 0; text-align: center;">
<select style="width: 100%; margin: 5px 0px 5px 0px;" size="1" name="jumpurl2" onChange="check(this.value)">';
         for($a=0 ; $a<(sizeof($temaid)) ; $a++){
                echo '<option value="'.$temaid[$a].'" ', $settings['theme_id'] == $temaid[$a] ? 'selected' : '' ,'>'.substr($temanavn[$a],0,20).'</option>';
         }
         echo '</select><br /><input style="margin: 5px 0px 5px 10px;" type="button" value="'.$txt['tp-changetheme'].'" onClick="jumpit()">
<input type="hidden" value="'.htmlspecialchars($scripturl . '?'.$tp_where.'theme='.$settings['theme_id']).'" name="jumpurl3">
</form>
                   <script type="text/javascript" language="Javascript">
var themepath=new Array()';

echo '
function jumpit(){
                          window.location=document.jumpurl1.jumpurl3.value
                          return false
                       }
                   </script>
   <script type="text/javascript">
        function check(icon)
       {

document.chosen.src= themepath[icon]
document.jumpurl1.jumpurl3.value = \'' . $scripturl . '?'. $tp_where.'theme=\' + icon
       }
</script>';
}
else
echo $txt['tp-nothemeschosen'];
}


Hope this works for ya!


EDIT: NO!!!!!!! I DIDN'T BEAT YOU!!!!!    :buck2: I think I"ll die now...


EDIT AGAIN: Maybe I did? ... I'm plum confused now. I thought I saw you answer...

Nokonium

Could I suggest a simpler though untried suggestion,

Find

// TPortal themebox in TPortalBlocks.template

Then scroll down to find

<div style="width: 95%; overflow: hidden;">
<img align="center" src="'.$settings['images_url'].'/thumbnail.gif" alt="" id="chosen" name="chosen"  />
</div>


and comment it out (or cut it out after making sure you have an unaltered copy)

Resident Geek


Horme Gaming

Quote from: nokonium on April 19, 2007, 09:38:06 PM
Could I suggest a simpler though untried suggestion,

Find

// TPortal themebox in TPortalBlocks.template

Then scroll down to find

<div style="width: 95%; overflow: hidden;">
<img align="center" src="'.$settings['images_url'].'/thumbnail.gif" alt="" id="chosen" name="chosen"  />
</div>


and comment it out (or cut it out after making sure you have an unaltered copy)

thanks that did it :)

Crip

why not show thumbnail .. realist ate?
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



Resident Geek

That would be my guess. I actually considered removing the thumbnails but decided to just remove the whole block in the end.
Realisate is important. I can't stand a cluttered forum. *Shudders*

Horme Gaming

simply as we opted for a long left panel layout instead of right and left, getting rid of the thumbnails makes it slightly smaller :)

This website is proudly hosted on Crocweb Cloud Website Hosting.