TinyPortal

Development => Support => Topic started by: Horme Gaming on April 14, 2007, 05:26:10 PM

Title: Removing Thumbnail in themes block
Post by: Horme Gaming on April 14, 2007, 05:26:10 PM
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
Title: Re: Removing Thumbnail in themes block
Post by: Horme Gaming on April 19, 2007, 09:03:05 PM
sorry guys im bumping this as its been 5 days
Title: Re: Removing Thumbnail in themes block
Post by: Zetan on April 19, 2007, 09:08:54 PM
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.
Title: Re: Removing Thumbnail in themes block
Post by: Resident Geek on April 19, 2007, 09:34:33 PM
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...
Title: Re: Removing Thumbnail in themes block
Post by: 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)
Title: Re: Removing Thumbnail in themes block
Post by: Resident Geek on April 19, 2007, 09:54:22 PM
That might work too. >__> :)
Title: Re: Removing Thumbnail in themes block
Post by: Horme Gaming on April 19, 2007, 10:40:06 PM
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 :)
Title: Re: Removing Thumbnail in themes block
Post by: Crip on April 19, 2007, 11:10:22 PM
why not show thumbnail .. realist ate?
Title: Re: Removing Thumbnail in themes block
Post by: Resident Geek on April 20, 2007, 01:23:14 PM
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*
Title: Re: Removing Thumbnail in themes block
Post by: Horme Gaming on April 20, 2007, 01:30:29 PM
simply as we opted for a long left panel layout instead of right and left, getting rid of the thumbnails makes it slightly smaller :)
Title: Re: Removing Thumbnail in themes block
Post by: Crip on April 20, 2007, 01:32:10 PM
Well cool sloopz! ;)
Title: Re: Removing Thumbnail in themes block
Post by: Resident Geek on April 20, 2007, 01:34:45 PM
I actually like it left and right.
It would be cool if you could make it so that people could choose how the layout was like.
Click and dragging blocks would ROCK!
I'm not putting it in as a feature request however because I doubt that the Devs would want to even consider it.
LOL. Great Idea but the the coding would be like pulling a hippo's tooth. :D
Title: Re: Removing Thumbnail in themes block
Post by: Horme Gaming on April 20, 2007, 02:10:36 PM
Quote from: ЯÃ'”Ã'•Ã'â€"dÃ'”иÃ'‚ Ã,,¢Ã'”Ã'”Ã,,·â„¢ on April 20, 2007, 01:34:45 PM
I actually like it left and right.
It would be cool if you could make it so that people could choose how the layout was like.
Click and dragging blocks would ROCK!
I'm not putting it in as a feature request however because I doubt that the Devs would want to even consider it.
LOL. Great Idea but the the coding would be like pulling a hippo's tooth. :D

Actually that idea sounds cool post ill back ya up :)
Title: Re: Removing Thumbnail in themes block
Post by: Zetan on April 20, 2007, 03:00:56 PM
Don't know whether this snippit still works for the latest TP

Floating Blocks (http://www.tinyportal.net/index.php?topic=8866.0)

It would be great if they snapped into position, I tried it once...
Title: Re: Removing Thumbnail in themes block
Post by: Resident Geek on April 20, 2007, 03:26:44 PM
WoW! That's like 90% of the way there. It's actually really close to what I was proposing.
It would have to be snappable though. and there would need to be a cookie or something to remember code positions, but other than that, it's most of the way there.
Wow!
Way to go Gobo!