Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
I would like to put a customboxpal on top of my frontpage with some welcome text, but I only want this palbox to appear for guests. Anybody who is logged in, should NOT see that palbox.

How can I do this ? I've attached the palbox that would need to be modified.

Thanks in advance!
Attachments
126518-custombox6pal.txt (0 Bytes, 25 downloads)

Sponsored Links
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
this on a sidebar or the front entrance? on the front entrance what ya can do is edit index.php and put in a line like

if($user[U_Number]){
$customepalbox[x][y] = ""
}

change the above to the $config code for the customepalbox.. mileage will vary...

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Thank you scroungr for the solution!
It's indeed for the front entrance, only.... I still don't know what to insert into which file. Could you please help me some more ?

Thanks,

Pasqual

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
in index.php

Find
Code
<br /><br /><br />						if ($index_include[1]['CustomBox12'] == $x && !$xused) {<br />							include "{$palspath}/pals/custombox12pal.php";<br />							$xused = 1;<br />						}<br />

change it to

Code
<br />						if ($index_include[1]['CustomBox12'] == $x && !$xused) {<br />							if(!$user[U_Groups]){<br />								include "{$palspath}/pals/newusercustompal.php";<br />							}<br />							else{<br />								include "{$palspath}/pals/custombox12pal.php";<br />							}<br />							$xused = 1;<br />						}					<br /><br />


Find
Code
<br /><br />						if ($index_include[2]['CustomBox12'] == $x && !$xused) {<br />							include "{$palspath}/pals/custombox12pal.php";<br />							$xused = 1;<br />						}<br />

change it to
Code
<br /><br />						if ($index_include[2]['CustomBox12'] == $x && !$xused) {<br />							if(!$user[U_Groups]){<br />								include "{$palspath}/pals/newusercustompal.php";<br />							}<br />							else{<br />								include "{$palspath}/pals/custombox12pal.php";<br />							}<br />							$xused = 1;<br />						}					<br />


Find

Code
<br />						if ($index_include[3]['CustomBox12'] == $x && !$xused) {<br />							include "{$palspath}/pals/custombox12pal.php";<br />							$xused = 1;<br />						}<br />

change it to

Code
<br /><br />						if ($index_include[3]['CustomBox12'] == $x && !$xused) {<br />							if(!$user[U_Groups]){<br />								include "{$palspath}/pals/newusercustompal.php";<br />							}<br />							else{<br />								include "{$palspath}/pals/custombox12pal.php";<br />							}<br />							$xused = 1;<br />						}		





make a custombox12pal.php contain what you want normal users to see..

make a newusercustompal.php contain what you want new users to see...

in control panel set placement of custombox12 to where you want it...

you can subsitute ANY custombox for custombox12 by changing the 12 to that number

now you can get funkier and use user groups but you will need to write a little script.. or pay me alot of money

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
[]scroungr said:
now you can get funkier and use user groups but you will need to write a little script.. or pay me alot of money [/]

Hehehe, thanks a lot!!
I will give it a try as soon as I get home! (in 10 minutes)

[]make a custombox12pal.php contain what you want normal users to see.. [/]
Well, the only thing I want is that customboxpal12 will only be seen by guests and when normal users enter my site, customboxpal12 will just be hidden for them.

Sponsored Links
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
well then remove these lines

Code
<br />							else{<br />								include "{$palspath}/pals/custombox12pal.php";<br />							}<br />


but still make sure to set the placement of custombox12 in your control panel

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
It's weird, but I can't get it to work

I wanted to test it with the first method, so I created custombox12pal.php and newusercustompal.php, both uploaded in my pals folder. Then I made the changes in index.php and uploaded all the stuff. I went into my control panel and activated custombox12 in my control panel (center, 1st position). I uploaded the modified index.php file and checked out my entrance page: nothing happened. (no difference if logged in or out).

When I opload my old index file, custombox12pal.php shows without problem. Where could the error be?

(I'm using 6.4.2, but that shouldn't matter. My index.php file is inside my threads folder)

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
that could be the problem... make sure the path you are using for the boxes is correct.. try litterals if you have to mileage may vary...

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
I doublechecked all paths and I'm 99% sure it's ok!($palspath}/pals/custombox12pal.php)

What do you mean with "try litterals if you have to mileage may vary..." (sorry, my english isn't that good)

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
try from where the index.php actually is.. you said its in threads? not in the docroot? so try

pals/custombox12pal.php

see if that works.. or send me a PM with a username, password, and ftp info to your forms and I will take a look..

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)