TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,020
  • Total Topics: 21,332
  • Online today: 737
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 458
  • Total: 459
  • @rjen

Admin Viewing and front page

Started by Joshsux, August 31, 2006, 05:58:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joshsux

Hey guys
---------------------
if you click www.flash.mrcrash.net you will see a block thats HTML that i just made, all i want this to do is be viewable to guests not administrators, all this does is have a block that follows them throughout the site untill they register, i was just wondering how i make it so even admins cannot view it, it is VERY annoying me seeing the welcome guest's message all the time i only want guests to be able to see it. thanks in advance
---------------------------------------------
Thank you in advance, Joshua.

IchBin

By default Admins can view EVERYTHING. Its made this way. If you don't want to view it, make another user account that you're not admin on. :)

RoarinRow

Not me, I want to see everything   :knuppel2:      :2funny:

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

IchBin


Nokonium

Quote from: Joshsux on August 31, 2006, 05:58:29 AM
Hey guys
---------------------
if you click www.flash.mrcrash.net you will see a block thats HTML that i just made, all i want this to do is be viewable to guests not administrators, all this does is have a block that follows them throughout the site untill they register, i was just wondering how i make it so even admins cannot view it, it is VERY annoying me seeing the welcome guest's message all the time i only want guests to be able to see it. thanks in advance
---------------------------------------------
Thank you in advance, Joshua.

In 0.86 you don't have that many options, but in 0.95 (which has entered the final alpha test phase) you will be able to have an article in a block that is viewable by only guests (and admins  >:D ) but you have the option to collapse the block.

Joshsux

yeah all i did was collapse it, and why do you want to see a "guests sign up" block when you are an admin =P... i'll just collapse it so they can see it.

I also may make a new account and set it as a Global Mod for me to use as i don't always like seeing all the admin things.

Thurnok

#6
Actually, you can do exactly what you want in 0.8.6.

In fact, I have a site where I set up a friend of mine as an Admin so he could manage the site for the most part.  He added a block to list various links of his that he liked to visit from time to time, and I of course did not want to see them.  So I "fixed" it - so to speak. ;)

Ok, so what you have is a center block at the top of your page (looking at your site).  Change the block to a phpblock.  Uncheck the frame and title display.  Surround your html with an echo statement that you put into a bit of code that checks if the user is a guest.  Here's an example using your actual info:


global $context;
if ($context['user']['is_guest']){
echo '
<p align="center"><font color="#ff0000"><b>Welcome Guests</b></font><br /><br />
<font color="#00ff00">Hello guest\'s, welcome to Sneaky-Shits. the home to<br />
special classic games and much much more!.<br /><br />
There is "a lot" of stuff that isn\'t Like the special classics.<br />
By registering you will have access to posting, many many more boards, and the<br />
ability to download. Click <a href="http://flash.mrcrash.net/index.php?PHPSESSID=fd3acf92b3ed5e9b188494fe35a6b2d6&amp;action=register">here</a><br />
to register</font></p>
';
}
Thurnok
The one, the only!

IchBin

Thats a great way to do it Thurnok. But what I was referring to is that you can't really do this to any of the built in TP blocks without modifying the code quite a bit.

Thurnok

Absolutely true Ich.  For the built-in TP Blocks, you are pretty much stuck.  And I wasn't trying to discount anything you or anyone else here was saying.

When I looked at his site however, and saw what he was doing, I figured I'd let him know how to do what he wanted.  Was hoping to show him he didn't need to create a new user and double log all the time to not display some things.

Cool looking site btw Josh.
Thurnok
The one, the only!

IchBin

My toes are officially OK Thurnok. :) Was just trying to be informative like you. ;)

This website is proudly hosted on Crocweb Cloud Website Hosting.