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,004
  • Total Topics: 21,330
  • Online today: 136
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 97
  • Total: 97

am I posting in the right place

Started by darakhshan, December 08, 2006, 07:07:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

darakhshan

sorry guys if I am in the wrong forum but consider it a support + chit chat ;D

I want to put this code
if($user_info['is_guest'])
{
//Show popup code here
}


in my index.template.php

but do not know where to put it
any body can give me an Idea :uglystupid2:

Thurnok

Can I ask what you are trying to accomplish?  And why do you want to put it into the index.template.php file?  Since you do not really show the popup code, and there does not appear to be any termination of following code (at least not self evident), why not put into one of your "guest visible" php blocks?
Thurnok
The one, the only!

darakhshan

Thank for the reply. I wanted to put it in a block just for guests to see
but I faced one problem I as admin can see this floating banner too
I made a block and set the permission so that only guests of my board get a big floating banner asking them to register . every thing is fine but I as admin get this annoying floating thing too
any Idea?

Thurnok

Sure.. its very simple... make sure your block is set to not show a frame or title, and make it non-shrinkable.

Put this code in the block:


// needed globals
global $context;

if ($context['user']['is_guest']){
     // all your code in here
}
Thurnok
The one, the only!

darakhshan

I as admin can still see it.

I chose the permission for guests only but still it pops for admin

G6Cad

As admin you will always see every thing, you cant turn the blocks off for admins, you can only shrink them down, but they will always be visible to you as Admin

darakhshan

thank you for your support.

sorry what do you mean?

this is my setting:

Do not use title/frame  ( is checked)
Do not allow block to collapse ( is checked)

now my problem is that I have made a big floating banner which is shown to guests but it gets into my way too even when I am loged in.

G6Cad

Just what i said, As administrator, you will always see every thing, you cant turn off blocks, articles like you can to other membergroups. They will always show for you no matter the settings you have or do

darakhshan

ok thanks. it is understandable .

any mayhow do you show a pop up or a floating banner to guests?
what would you do if you were me? :(

Assistance

make a block for guest (phpbox)

put this code in:

if (in_array('1',$GLOBALS['user_info']['groups']))
{
  echo '';
}
else
{
  echo 'banner code';
}


put your banner code in ^^
and make box no title no frame, and you will not see it

it works

This website is proudly hosted on Crocweb Cloud Website Hosting.