Quick Login   
 
Register AdminFusion Tutorials
 
Featured Sponsors


One.com Domain and Hosting


Register
Forum of the Month
Australian Webmaster
fotm

A webmaster forum specifically catering for Australian site owners. We discuss site development, marketing and management issues.

Tag Cloud
Latest Threads
Forum Stats
8,073 Members
165,866 Posts
47 Users Online

Please welcome our newest member, masood!

Affiliates
Go Back AdminFusion » Getting Started » Software » Other Software » Show to guests in myBB
Welcome to the AdminFusion. AdminFusion is the ultimate resource for forum administrators and moderators. With exclusive articles, interviews with the experts, free downloadable skins, and the revolutionary post exchange system - PostFusion, AdminFusion is the place to go for all of your forum needs.  By joining AdminFusion, you will become part of a thriving admin community and immediately gain access to all of these resources. Registration is fast, simple and absolutely free so please join us today!
Want more than our forums? Try these: Post Fusion Forum Matrix
Old 04-20-2007, 02:28 AM   #1

Will's Avatar

Title: Forum Enthusiast

Points: 9,794, Level: 29Points: 9,794, Level: 29Points: 9,794, Level: 29
Level up: 30%, 156 Points neededLevel up: 30%, 156 Points neededLevel up: 30%, 156 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Oct 2005

Posts: 2,139

Location: Maryland, US

Will has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant future
Send a message via AIM to Will Send a message via MSN to Will  
 
Show to guests in myBB

How can i show something just to guests in mybb?

i want to add a login form in the header.. but i want it just to show to guests lol not members too!!
like phpbb is something like
Code:
<!-- begin user_logged_out --> guest text <!-- end user_logged_out -->

Thanks
__________________
Will Stumpf - TalkNikon
Submit your sites -> Quality Link Directory
Reply With Quote
Old 04-20-2007, 02:58 AM   #2

Title: Member

Points: 1,791, Level: 11Points: 1,791, Level: 11Points: 1,791, Level: 11
Level up: 12%, 59 Points neededLevel up: 12%, 59 Points neededLevel up: 12%, 59 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Jun 2006

Posts: 108

Location: California, US

Tikitiki has a spectacular aura aboutTikitiki has a spectacular aura about
 
 
You need to add code like the following:

Code:
if($mybb->user['uid'] == 0)
{
     $stuff = "Whatever here";
}
and then use $stuff in your template
Reply With Quote
Old 04-20-2007, 03:05 AM   #3

Adam's Avatar

Title: Chadwick ≥ Cadence

Points: 9,488, Level: 29Points: 9,488, Level: 29Points: 9,488, Level: 29
Level up: 30%, 462 Points neededLevel up: 30%, 462 Points neededLevel up: 30%, 462 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Sep 2005

Posts: 1,636

Adam has a brilliant futureAdam has a brilliant futureAdam has a brilliant futureAdam has a brilliant futureAdam has a brilliant futureAdam has a brilliant futureAdam has a brilliant futureAdam has a brilliant futureAdam has a brilliant futureAdam has a brilliant futureAdam has a brilliant future
 
 
Where do you add this bit of code?
__________________
Reply With Quote
Old 04-20-2007, 04:50 AM   #4

Title: Apprentice

Points: 1,711, Level: 11Points: 1,711, Level: 11Points: 1,711, Level: 11
Level up: 12%, 139 Points neededLevel up: 12%, 139 Points neededLevel up: 12%, 139 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Mar 2007

Posts: 222

Location: Kingsport, TN

JonathanSA is a jewel in the roughJonathanSA is a jewel in the roughJonathanSA is a jewel in the rough
Send a message via AIM to JonathanSA  
 
You could probably modify global.php, as it effects most all of the files, however, you'd generally place that into the PHP file you're looking to have the bit shown to guest on (i.e. index.php, portal.php etc).

MyBB doesn't allow conditionals at the moment.
Reply With Quote
Old 04-20-2007, 04:07 PM   #5

Title: Member

Points: 1,791, Level: 11Points: 1,791, Level: 11Points: 1,791, Level: 11
Level up: 12%, 59 Points neededLevel up: 12%, 59 Points neededLevel up: 12%, 59 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Jun 2006

Posts: 108

Location: California, US

Tikitiki has a spectacular aura aboutTikitiki has a spectacular aura about
 
 
Jonathan is correct. global.php is sufficient, but it'd be better if you put it on the file you want it to show up on. Usually you need to put the code after require "./global.php"; unless it's global.php, in which case it should be put somewhere near the bottom so it has time to initialize all the variables.
Reply With Quote
Old 04-20-2007, 05:23 PM   #6

Will's Avatar

Title: Forum Enthusiast

Points: 9,794, Level: 29Points: 9,794, Level: 29Points: 9,794, Level: 29
Level up: 30%, 156 Points neededLevel up: 30%, 156 Points neededLevel up: 30%, 156 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Oct 2005

Posts: 2,139

Location: Maryland, US

Will has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant futureWill has a brilliant future
Send a message via AIM to Will Send a message via MSN to Will  
 
Yay it works Thanks
__________________
Will Stumpf - TalkNikon
Submit your sites -> Quality Link Directory
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

 
Posting Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
[MyBB News] MyBB 1.2.5 Released - Security Update Industry News Other Software 1 04-17-2007 10:50 PM
[MyBB News] MyBB 1.2.4 Released - Important Security Update Industry News Other Software 2 04-04-2007 12:38 PM
[MyBB News] The MyBB Group & Microsoft Corporation Partnership Industry News Other Software 12 04-01-2007 05:28 AM
myBB 1.2 released! Kem Rixen Other Software 13 09-05-2006 05:53 PM
Chris B - MyBB Owner Ryan Interviews 9 08-23-2006 07:06 AM

AdminFusion

All times are GMT +1. The time now is 05:01 AM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0 © 2005-2008 AdminFusion - All Rights Reserved


From:
Title:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72