Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
I'm trying to pull together a small hack that would diplay a msg to users that they could post to a forum if they where logged in. The problem that some of my new users are having is posting when they are not yet registered or logged in. They don't realise that they need to be logged in in order to post.

I think I have this hack working well, but I would appreciate anyone who is more familiar with W3T to give it a quick peak. The only potential problem I see with my hack is how forum groups posting priveleges are treated. I presume that "-3-" means general users. Anyway, here it is:



Line 421 of postlist.php

// ---------------------------------------------------------------------
// We need to check and see if they have write privileges for this forum
$gsize = sizeof($Grouparray);
for ($i=0; $i <$gsize; $i++) {
if (ereg("-$Grouparray[$i]-",$CanWrite) ) {
$makepost = "yes";
break;
}
}

if (ereg("-3-",$CanWrite) ) {
$makepostlogged = "yes";
}

if ($makepost == "yes") {
echo "<a href="$config[phpurl]/newpost.php?Cat=$Cat&Board=$Board&page=$page&view=$view&sb=$sb&o=$o"><img $images[newpost] src="$config[images]/newpost.gif" alt="$lang[MAKE_A_NEW]" border=0></a>";
}
else if ($makepostlogged == "yes"){
echo "<p class="small">You could post if you were <a href="login.php">logged in</a>
</p>";
echo "<img alt="*" src="$config[images]/greynewpost.gif" $images[newpost]>";
}
else {
echo "<img alt="*" src="$config[images]/greynewpost.gif" $images[newpost]>";
}



Sponsored Links
Entire Thread
Subject Posted By Posted
"you could post if you were logged in" The Team 03/20/2001 8:41 PM
Re: "you could post if you were logged in" Jockox3 03/20/2001 11:13 PM
Re: "you could post if you were logged in" The Team 03/21/2001 4:48 AM

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 20240506)