Hi folks,
Stumbled upon a dillema today while trying to modify my own TP 0.9.8 installed shoutbox. I wanted it to look more like the newer TP versions where the 'Show 50 Latest' is rendered near the [Shout!] button.
Seems simple enough huh? I searched around the site and while I didn't find any resolution, I did find some cool new snippets, so hooray for that.
In any case, you're probably asking: why dont he just upgrade to the newer TP? Well in my package manager, TP 0.9.8 only has the [ List Files ] and [ Delete Files ] option. :(
Rather than risking a site down, I'd rather just find out how to hack the shoutbox to display the way the newer ones do. ATM on my site it renders the shouts, then a link to more shouts, the text box and the shout button. I'd like it to look like this instead:
[Shout!] Show 50 Latest
I've tried editing TPmodules.php, TPortal.php, TPModules.template.php but I FAIL :-\
Please help?
p.s. See my last post below where I solved my own issue. Works great!
If you download the TP V098 package now from the downloads, and upload it to your package folder on the server, you will have the uninstall link in your list aswell. So try that and you will soon have a shoutbox like you want.
To get these options in TP V098 would requre a lot of changes in the code as TP V098 and TP V1 have changed a lot of things around.
Thanks for responding G6. Looks like I am able to run the uninstall after uploading the package to the server.
Only problem now is errors on 3 files to uninstall, so I'll have to do that manually.. Something to save for another day. :(
I guess I'll try to get a UAT server up..
Hey G6 - I just decided to remove the 'Show Last x Posts' line by zeroing out that value in the shout admin. Now its gone from the shout box display.
I've tried a number of ways to hardcode a URL right next to the [ Shout ] button and it wont render. Can you perhaps point me in the right direction?
I'm just going to make an <a href=""> that points to ?action=tpmod;sa=shoutbox;shouts=100
If I only knew were it goes so it shows up right besisde the shout button... (https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fsmiliesftw.com%2Fx%2Fmsn_032.gif&hash=95e60d2e6991b696c80222f6a5115c248e011804) (http://smiliesftw.com)
Ok ok ok - I figured it out just shy of 3 am in the morning.
Go to: Themes/default/TPortalBlocks.template.php
Find:
echo '<input name="tp-shout-url" type="hidden" value="'.htmlspecialchars($tp_where).'"><input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>';
Replace:
echo '<a href="' , $scripturl , '?action=tpmod;sa=shoutbox;shouts=100">Show Last 100</a>
<input name="tp-shout-url" type="hidden" value="'.htmlspecialchars($tp_where).'"><input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>';
Make sure you go to Shout Admin and set "show last" to zero so you dont get duplicate links. Looks awesome now.