I added a nice little feature to my sites, just a .gif which makes the "Register" button flash red when someone is not logged in, .. basically drawing new people to the site to the register button. I was wondering if anyone knows how, and would do me the favor of making me a little snippet or something that will make my (https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.sotg.us%2FForum%2FThemes%2Fhelios_multi_tp%2Fimages%2Fpm.gif&hash=c25b78f4ed2339def9188e9e2e64b98cca1618dd) button flash when someone has an unread PM. I'm sure it's pretty easy... I'm just a NEWB! lol..... if someone could hook me up with that, I'd greatly appreciate it!
Thank you!
Joe
Great ideas! :)
for the PM button you need to check if there are new pm's..like:
if($context['user']['is_logged'] && $context['user']['unread_messages']>0)
echo 'flashing PM button code here.....';
elseif($context['user']['is_logged'] && $context['user']['unread_messages']==0)
echo 'normal PM button code here...';
You might want to show the button only to members..if not you need remove the $context['user']['is_logged'] part.
I love these ideas.... Thanks.
You can see what the register button looks like at:
www.hawaiifighter.com and www.sotg.us/Forum
Thanks Bloc.
That worked great!
If you have a prog like Photoshop or Paint Shop Pro take the original icon/button (gif format), select all and invert the colours, then save it as a seperate gif. Then with Image Ready, Animation Shop or similar make an animated gif out of the two gif's.
I already made the buttons, I was just looking for the code.
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.sotg.us%2FForum%2FThemes%2Fhelios_multi_tp%2Fimages%2Fpmred.gif&hash=8ee7e089569372e79830806cd47612387df50439)(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.sotg.us%2FForum%2FThemes%2Fhelios_multi_tp%2Fimages%2Fenglish%2Fregister.gif&hash=04d47387de5c14ad8dae208df841cc2e90bd7924)
Thanks for the buttons ;)
Is it possible to get the Register button in norwegian with the text "Registrer" ?
You can make your own buttons right here.
http://www.tinyportal.net/smf/index.php?page=13
But how do I make them flashing?? (The only pic. program I have is Paint..)
Its not hard to change colors of something. Even in paint.:)
[attachment deleted by admin]
Well, the picture is corrupt..... :buck2:
I can`t open it...
Seems everything you download is corrupt today erikman. I just downloaded the file again and everything seems find here.
Could you try to send it to me by PM then?
If you can see the picture in the post right click on the picture and choose save picture as. I can't attach to a PM.
How would this work on a theme using css links as buttons?
You would have to change the link so that it does work. And you'd probably want a different button for it too. :)
Are you thinking of something specific?
well, most of the themes I use have css buttons and was just wondering how it would work. But looking at the index.templates of each one, I see they are all different so the coding would probably be different for each as well.
I guess I'll have to post in the appropriate thread for each since I have a question or 2 about some of them anyways. :)
Here's one I have saw used for a new PM, came from that smf mod.
[attachment deleted by admin]
Here is a Donate button for yaz too in case you would like to take donations...
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fbigjohnsbikes.net%2Fsmf%2FThemes%2FTP_helios_multi11_rc2%2Fimages%2Fanim_donate.gif&hash=883d181dc5ed670d32cc088010fc5f48d5e024cc)
Anibody know how to make an animated button to the default theme RC2, like this one that we are using here on the bloczone?
I already have put the button next to the members buttons called "DoaÇÃÆ'Ã,µes" and i want to know if it is possible to make this one (DoaÇÃÆ'Ã,µes) animated and if i can how.
Thank you very much to you all.
another way....
YourTheme/index.template.php
Find:
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ', ', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.';
Afer Add:
// Show Flashy icon if user has new messages but forget the guests
if (!$context['user']['is_guest'] && $context['user']['unread_messages'])
echo '
<a href="' . $scripturl . '?action=pm"><img src="' . $settings['images_url'] . '/gif.gif" border="0" />(' . $context['user']['unread_messages'] . ')</a> ' . $context['menu_separator'] . '';
Add Image To YourTheme/Images/newpm.gif
SMF has a mod for this now..goes in the Default Theme.
I have edited the tportalblock.template.php (which is where it is handled for me anyway). This is under the user block.
Find:
if($context['user']['unread_messages']>0)
echo '<br />'.$bullet.'<a style="font-weight: bold; " href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , '</a>';
Replace with:
if($context['user']['unread_messages']>0)
echo '<br />'.$bullet.'<a style="font-weight: bold; " href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , ' <img src="' . $settings['images_url'] . '/msg.gif" border="0"><bgsound src="' . $settings['images_url'] . '/Mail01.wav" border="0"></a>';
I couldn't attach the wav file, but you can easily find your own. Just make sure to change the file name in the above code so it will work.
That is indeed handy and a bit creative as well. ;)
Plus using the portal blocks it is a lot easier...most themes use the default one so there is less editing to be done than if it was through the index.template
Exactly..now go get in shape.. ;D ;D
:2funny: :knuppel2: :tickedoff:
I did...it is round... :2funny:
Quote from: technodragon73 on March 14, 2006, 11:30:07 PM
I have edited the tportalblock.template.php (which is where it is handled for me anyway). This is under the user block.
Find:
if($context['user']['unread_messages']>0)
echo '<br />'.$bullet.'<a style="font-weight: bold; " href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , '</a>';
Replace with:
if($context['user']['unread_messages']>0)
echo '<br />'.$bullet.'<a style="font-weight: bold; " href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , ' <img src="' . $settings['images_url'] . '/msg.gif" border="0"><bgsound src="' . $settings['images_url'] . '/Mail01.wav" border="0"></a>';
I couldn't attach the wav file, but you can easily find your own. Just make sure to change the file name in the above code so it will work.
Thanks for posting this, added it to my boards. Interestingly, the sound does not work in FF. However, does work in both IE and Opera. ?? .
I have tried this at my site
http://www.therisenguild.com
And it works great. The graphic (https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.therisenguild.com%2FThemes%2Frisen%2Fimages%2Fenglish%2Fnewpm.gif&hash=51037de7e757f010ebdf803094d1813e10ab5410) shows up just fine when a New PM comes in. However..the code i'm using (I put in absolute a href to try to see if that would work but it doesn't anyhow) doesn't seem to make that picture a link. Dunno why. Shows up fine, just ignore the whole <a href> no matter what I use in it.
if($context['user']['unread_messages']>0)
echo '<br />'.$bullet.'<a href="http://www.therisenguild.com/tinyportal/index.php?action=pm">' , ' <img src="' . $settings['images_url'] . '/english/newpm.gif" border="0"></a>';
How do I get this to work in Tiny Portal User Block, 8.6 is the version I use.
forum/Themes/default/TPortalBlocks.template.php
Open and find:
if($context['user']['unread_messages']>0)
echo '<br />'.$bullet.'<a style="font-weight: bold; " href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , '</a>';
Change to:
if($context['user']['unread_messages']>0)
echo '<br />'.$bullet.'<a style="font-weight: bold; " href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , ' <img src="' . $settings['images_url'] . '/msg.gif" border="0"><bgsound src="' . $settings['images_url'] . '/Mail01.wav" border="0"></a>';
Thank you IchBinâââ,¬Å¾Ã,¢
Will this work on a non Tiny Portal Site, not that I plan on getting rid of Tiny Portal, I love it.
I would like to know how to do this on a regular site if anyone knows
If you go back a couple of pages you'll see how to make this work in any theme.
http://www.tinyportal.net/smf/index.php?topic=1570.msg26454#msg26454
Quote from: IchBinÃ,â,,¢ on September 04, 2006, 12:47:16 AM
If you go back a couple of pages you'll see how to make this work in any theme.
http://www.tinyportal.net/smf/index.php?topic=1570.msg26454#msg26454
Thanks, I will keep looking that code is not in the theme I was looking into, no worries. Thanks anyway
The exact same code may not be found. But for those themes that have the PM info with user info on the main page just look for something like this in the theme.
$context['user']['unread_messages']
Great thank you
ok i tried and it works!
but to have a sense, should we put off the normal advise of a pm received? (i mean the one that apperas in a popup)
That would be a personal choice I would think, I have mine animated in the TP block as well with sound.
Very nice, works well :)
What about just in the index.template.php without TP?? ... the code MAX gave a few post ago doesn't work on SMF Default Theme.. 1.1RC3 ... ?
crip
There is a mod out for that now, BigGuy put it out.
http://mods.simplemachines.org/index.php?mod=454
Thanks, but I have it working without a mod.. just some simple code changes. :)
That is what I did also, changed the code. I have mine animated and with sound inn the TP Block and not the forum index.
I changed the code in the index.template.php < b r / >; one of those & an echo '
In my theme the mod doesn't work as I don't have any userinfo block.
I am using the 'userbox' code in a block to display when new PM's come in. Can somone tell me which code in this thread will display the image and sound for this purpose? :) Cheers.
http://unt.swisshut.com
Animated PM icon in the user block.
In the forum/Themes/default/TPortalBlocks.template.php
if($context['user']['unread_messages']>0)
echo '<br />'.$bullet.'<a style="font-weight: bold; " href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , '</a>';
replace with
if($context['user']['unread_messages']>0)
echo '<br />'.$bullet.'<a style="font-weight: bold; " href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , ' <img src="' . $settings['images_url'] . '/msg.gif" border="0"><bgsound src="' . $settings['images_url'] . '/Mail01.wav" border="0"></a>';
upload the msg.gif to your images
This was found on Tiny Portal Site Animated PM Icon (http://www.tinyportal.net/smf/index.php?topic=1570.20)
Make sure if you use sound that the sound file is correctly named, also you can use any image you like for the animation. I had one custom made for my site.
Thanks! That shows up the image :) I don't get the sound though, but I'm assuming it might be because I'm running firefox?
Quote from: OzButcher on December 07, 2006, 02:39:08 AM
Thanks! That shows up the image :) I don't get the sound though, but I'm assuming it might be because I'm running firefox?
Did you add a sound file?
Has this process changed for 1.1 and .97? I have tried and cannot find any of that code in the newer versions.
Quote from: Kaye on April 21, 2006, 02:33:51 AM
Quote from: technodragon73 on March 14, 2006, 11:30:07 PM
I have edited the tportalblock.template.php (which is where it is handled for me anyway). This is under the user block.
Find:
if($context['user']['unread_messages']>0)
echo '<br />'.$bullet.'<a style="font-weight: bold; " href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , '</a>';
Replace with:
if($context['user']['unread_messages']>0)
echo '<br />'.$bullet.'<a style="font-weight: bold; " href="', $scripturl, '?action=pm">' .$txt['tp-pm2'].' ',$context['user']['unread_messages'] , ' <img src="' . $settings['images_url'] . '/msg.gif" border="0"><bgsound src="' . $settings['images_url'] . '/Mail01.wav" border="0"></a>';
I couldn't attach the wav file, but you can easily find your own. Just make sure to change the file name in the above code so it will work.
Thanks for posting this, added it to my boards. Interestingly, the sound does not work in FF. However, does work in both IE and Opera. ?? .
yes.. it not play with ff
anybody can resolve this?... tq
Just go here: http://www.tinyportal.net/index.php?topic=1570.msg26454#msg26454
add the code for it in your index.template.php .. couldn't be easier. :)
A quick google on bgsound for Firefox and you'll discover that the bgsound tag is IE specific. You'll need to use embed. If you don't know how to use embed, then google again. :)