Hi! I've maked a guestbar warning in my site with this code:
open index.template.php
find:
echo '
<div id="mainarea">';
}
replace with:
echo '
<div id="mainarea">';
// Start GuestBar
if ($context['user']['is_guest'])
echo '
<div id="guestbar">
', $txt['guestbartxt'], '
</div>';
// End GuestBar
}
open index.english.php
add:
// Guest Bar
$txt['guestbartxt'] = '<strong>Warning:</strong>
You are not registered yet. <a href="' . $scripturl . '?action=register">"Register"</a>
or <a href="' . $scripturl . '?action=login">"Login"</a>
to access all functions and delete this warning.';
open index.italian.php
add:
// Guest Bar
$txt['guestbartxt'] = '<strong>Avviso:</strong>
Non sei registrato al sito. <a href="' . $scripturl . '?action=register">"Registrati"</a>
o fai il <a href="' . $scripturl . '?action=login">"Login"</a>
per accedere a tutte le funzioni ed eliminare questo avviso.';
open style.css
add:
/* Guest Bar Start */
#guestbar {
margin-top: 10px;
padding: 5px;
background: white;
color: #000;
border: #000 1px dotted;
font-size: x-small;
font-family: verdana, sans-serif;
}
#guestbar a {
color: #00f;
text-decoration: none;
font-weight: bold;
}
/* Guest Bar End */
U can see a demo here: http://darkwolf.altervista.org/ (http://darkwolf.altervista.org/) ;)
-
Or here (english): http://darkwolf.altervista.org/forum/index.php?language=english (http://darkwolf.altervista.org/forum/index.php?language=english)
Would you like this moved to Tips and Tricks (http://www.simplemachines.org/community/index.php?board=72.0)?
Zitat von: Nas in März 20, 2009, 12:15:10 NACHMITTAGS
Would you like this moved to Tips and Tricks (http://www.simplemachines.org/community/index.php?board=72.0)?
Yes please :)
And sorry for my error.
Moved and added to the Tips and Tricks (index) (http://www.simplemachines.org/community/index.php?topic=15899.0). :)
Thank'u very much Nas :)
-
Edit: i've inserted font-weight: bold; in css to remove more strong from code ;)
CAN Anyone show me the proof whether work or not
Zitat von: Techyden in März 22, 2009, 10:19:55 VORMITTAG
CAN Anyone show me the proof whether work or not
you could try clicking the demo link in the first post ;D
Nice coding. Will be put to use.
Dark-Wolf, would you like this to be made into a mod?
I think isn't necessary but if you want/can for me is ok :)
I forgot, this is already a mod.
http://custom.simplemachines.org/mods/index.php?mod=1607