News:

Wondering if this will always be free?  See why free is better.

Main Menu

GuestBar Warning!

Started by L'AltroWeb, March 20, 2009, 12:11:31 PM

Previous topic - Next topic

L'AltroWeb

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">&quot;Register&quot;</a>
 or <a href="' 
$scripturl '?action=login">&quot;Login&quot;</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">&quot;Registrati&quot;</a> 
 o fai il <a href="' 
$scripturl '?action=login">&quot;Login&quot;</a>
 per accedere a tutte le funzioni ed eliminare questo avviso.'
;


open style.css
add:
/* Guest Bar Start */
#guestbar {
	
margin-top10px;
	
padding5px;
	
backgroundwhite;
	
color#000;
	
border#000 1px dotted;
	
font-sizex-small;
	
font-familyverdanasans-serif;
}
#guestbar a {
	
color#00f;
	
text-decorationnone;
	
font-weightbold;
}
/* Guest Bar End */


U can see a demo here: http://darkwolf.altervista.org/  ;)
-
Or here (english): http://darkwolf.altervista.org/forum/index.php?language=english

Marcus Forsberg


L'AltroWeb


Marcus Forsberg


L'AltroWeb

#4
Thank'u very much Nas :)
-
Edit: i've inserted font-weight: bold; in css to remove more strong from code ;)

Hell Raiser

CAN Anyone show me the proof whether work or not
Need Help with SMF ? Ask me may be i can help you out




bullbreedluverz

Quote from: Techyden on March 22, 2009, 10:19:55 AM
CAN Anyone show me the proof whether work or not

you could try clicking the demo link in the first post  ;D

agbattery

Nice coding.  Will be put to use.
OEM hxxp:www.accessorygenie.com/batteries-c-1.html [nonactive], hxxp:www.accessorygenie.com/battery-chargers-c-2.html [nonactive], hxxp:www.accessorygenie.com/ac-adapters-c-3.html [nonactive], hxxp:www.accessorygenie.com/memory-cards-c-4.html [nonactive], hxxp:www.accessorygenie.com/gps-c-102.html [nonactive], hxxp:www.accessorygenie.com/radar-detectors-c-103.html [nonactive], and other hxxp:www.accessorygenie.com [nonactive]

L'AltroWeb


JBlaze

Dark-Wolf, would you like this to be made into a mod?
Jason Clemons
Former Team Member 2009 - 2012

L'AltroWeb

I think isn't necessary but if you want/can for me is ok :)

JBlaze

Jason Clemons
Former Team Member 2009 - 2012

Advertisement: