Jump to content


[IPB 1.3] "Add Tutorial" Link Permissions (Tutorials 4.61 Jaddo.net)


No replies to this topic

#1 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 28 November 2004 - 05:24 PM

"Add Tutorial" Link Permissions Hack
for Tutorials v 4.61 IPB mod -Jaddo.net

By default the "Add Tutorial" Link is displayed to guests as well as members in the Tutorials v 4.61 IPB mod by Jaddo.net. This is the case even if the "Allow guests to submit Knowledge Base Articles" Admin CP option is set to disallow guest posting of articles. If this option is chosen guests cannot actually post (they are forwarded to a login screen when they hit "submit") but they may spend a lot of time composing a tutorial only to have it lost on submission.

To show the "Add Tutorial" Links only to registered members and hide them from guests you can use my little hack...

FIND (in /sources/Tutorial.php):
		$add= "<a href='{$ibforums->base_url}act=Tutorials&CODE=05&CID=".$ibforums->input['CID']."'><{TUT}></a>";
REPLACE WITH:
		// Permissions Hack
		if ($ibforums->member['id']) {
		 $add= "<a href='{$ibforums->base_url}act=Tutorials&CODE=05&CID=".$ibforums->input['CID']."'><{TUT}></a>";
		}
		else {
		$add= " ";			
		}
		// end Permissions Hack
That's it. B)

-=DKC=-


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users