Advertisement:

Author Topic: GuestBar Warning!  (Read 21134 times)

Offline L'AltroWeb

  • Jr. Member
  • **
  • Posts: 344
  • Gender: Male
  • L'AltroWeb
    • laltroweb on Facebook
    • @laltroweb on Twitter
    • L'AltroWeb
GuestBar Warning!
« on: March 20, 2009, 12:11:31 PM »
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
« Last Edit: March 22, 2009, 12:23:31 PM by Dark-Wolf »

Offline Marcus Forsberg

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,608
  • Gender: Male
    • marcus.t.forsberg on Facebook
    • marcusforsberg on LinkedIn
    • @marcusforsberg on Twitter
    • marcusforsberg.net
Re: GuestBar Warning!
« Reply #1 on: March 20, 2009, 12:15:10 PM »
Would you like this moved to Tips and Tricks?

Offline L'AltroWeb

  • Jr. Member
  • **
  • Posts: 344
  • Gender: Male
  • L'AltroWeb
    • laltroweb on Facebook
    • @laltroweb on Twitter
    • L'AltroWeb
Re: GuestBar Warning!
« Reply #2 on: March 20, 2009, 12:18:17 PM »
Would you like this moved to Tips and Tricks?
Yes please :)
And sorry for my error.

Offline Marcus Forsberg

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,608
  • Gender: Male
    • marcus.t.forsberg on Facebook
    • marcusforsberg on LinkedIn
    • @marcusforsberg on Twitter
    • marcusforsberg.net
Re: GuestBar Warning!
« Reply #3 on: March 20, 2009, 12:28:11 PM »
Moved and added to the Tips and Tricks (index). :)

Offline L'AltroWeb

  • Jr. Member
  • **
  • Posts: 344
  • Gender: Male
  • L'AltroWeb
    • laltroweb on Facebook
    • @laltroweb on Twitter
    • L'AltroWeb
Re: GuestBar Warning!
« Reply #4 on: March 20, 2009, 12:31:23 PM »
Thank'u very much Nas :)
-
Edit: i've inserted font-weight: bold; in css to remove more strong from code ;)
« Last Edit: March 20, 2009, 02:23:20 PM by Dark-Wolf »

Offline Hell Raiser

  • Jr. Member
  • **
  • Posts: 384
  • Gender: Male
Re: GuestBar Warning!
« Reply #5 on: March 22, 2009, 10:19:55 AM »
CAN Anyone show me the proof whether work or not
Need Help with SMF ? Ask me may be i can help you out




bullbreedluverz

  • Guest
Re: GuestBar Warning!
« Reply #6 on: March 22, 2009, 10:40:25 AM »
CAN Anyone show me the proof whether work or not

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

Offline agbattery

  • Newbie
  • *
  • Posts: 7
  • Gender: Male
    • Accessory Genie
Re: GuestBar Warning!
« Reply #7 on: March 23, 2009, 03:57:38 PM »
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]

Offline L'AltroWeb

  • Jr. Member
  • **
  • Posts: 344
  • Gender: Male
  • L'AltroWeb
    • laltroweb on Facebook
    • @laltroweb on Twitter
    • L'AltroWeb
Re: GuestBar Warning!
« Reply #8 on: March 25, 2009, 10:13:51 AM »
Nice coding.  Will be put to use.
Thanks :)

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,152
    • @fragicide on Twitter
Re: GuestBar Warning!
« Reply #9 on: April 24, 2009, 08:02:53 PM »
Dark-Wolf, would you like this to be made into a mod?

Offline L'AltroWeb

  • Jr. Member
  • **
  • Posts: 344
  • Gender: Male
  • L'AltroWeb
    • laltroweb on Facebook
    • @laltroweb on Twitter
    • L'AltroWeb
Re: GuestBar Warning!
« Reply #10 on: April 24, 2009, 11:02:25 PM »
I think isn't necessary but if you want/can for me is ok :)

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,152
    • @fragicide on Twitter
Re: GuestBar Warning!
« Reply #11 on: May 12, 2009, 01:09:21 AM »