Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.9
Author Message
restinpeace
New Member
New Member



Joined: Jul 07, 2005
Posts: 3

PostPosted: Wed Dec 21, 2005 9:22 pm Reply with quote

i'm using fresh install phpnuke 7.9.0.3.1b

The thing is, I want to be able to restrict a REGISTERED MEMBER's access to the Downloads Module based on the POINTS they accumulate on the site via the points system in the User Group module. so I have tried to edit my downloads index.php function menu($maindownload) to be like this:

Code:
function menu($maindownload) { 

    global $prefix, $user_adddownload, $module_name, $cookie, $user, $cookie, $user_prefix, $dbi, $anonymous, $sitekey, $userinfo, $mode, $t, $f, $admin, $stop, $redirect, $gfx_chk, $language, $query;
   if ($userinfo[points] > 50) {
    OpenTable();
    $ThemeSel = get_theme();
    if (file_exists("themes/$ThemeSel/images/down-logo.gif")) {
   echo "<br><center><a href=\"modules.php?name=$module_name\"><img src=\"themes/$ThemeSel/images/down-logo.gif\" border=\"0\" alt=\"\"></a><br><br>";
    } else {
   echo "<br><center><a href=\"modules.php?name=$module_name\"><img src=\"modules/$module_name/images/down-logo.gif\" border=\"0\" alt=\"\"></a><br><br>";
    }
    echo "<form action=\"modules.php?name=$module_name&amp;d_op=search&amp;query=$query\" method=\"post\">"
   ."<font class=\"content\"><input type=\"text\" size=\"25\" name=\"query\"> <input type=\"submit\" value=\""._SEARCH."\"></font>"
   ."</form>";
    echo "<font class=\"content\">[ ";
    if ($maindownload>0) {
   echo "<a href=\"modules.php?name=$module_name\">"._DOWNLOADSMAIN."</a> | ";
    }
    if ($user_adddownload == 1) {
   echo "<a href=\"modules.php?name=$module_name&amp;d_op=AddDownload\">"._ADDDOWNLOAD."</a>"
       ." | ";
    }
    echo "<a href=\"modules.php?name=$module_name&amp;d_op=NewDownloads\">"._NEW."</a>"
   ." | <a href=\"modules.php?name=$module_name&amp;d_op=MostPopular\">"._POPULAR."</a>"
   ." | <a href=\"modules.php?name=$module_name&amp;d_op=TopRated\">"._TOPRATED."</a> ]"
   ."</font></center>";
    CloseTable();
   } else {
   OpenTable();
   echo "Sorry la beb! Ruangan ini hanya untuk user yang mempunyai <b>50 mata</b> dan keatas sahaja.";
   CloseTable();
}



unfortunately I got this error
Quote:
Parse error: parse error, unexpected $ in /home/public_html/html/modules/Downloads/index.php on line 2490


Anyone who can fixs this?
p/s: line 2490 refer to the symbol of close tag ?>
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Thu Dec 22, 2005 9:37 am Reply with quote

You have not closed the first large IF statement with an ending } or the function itself.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
wakey
Hangin' Around



Joined: Dec 18, 2005
Posts: 42
Location: newcastle upon tyne (that is planet earth)

PostPosted: Thu Dec 22, 2005 6:04 pm Reply with quote

i have found a site that uses this very idea
**RAVEN if you can check it out too****

the site is http://www.westernstudios.net the module says it is a nsn script from
Nuke scripts.
im off to check it out and if it is available ill let you all know
 
View user's profile Send private message Visit poster's website MSN Messenger
wakey







PostPosted: Thu Dec 22, 2005 6:07 pm Reply with quote

i forgot to add it sets up an access level not a minimum "points" level so it means you have better control over who can download what
ie a new user can not download the good stuff
but regular users that post good can etc.....
 
montego







PostPosted: Thu Dec 22, 2005 6:11 pm Reply with quote

Wakey, this is not the same as what restinpeace is after. NSN Groups Downloads along with NSN Groups (a prerequisite for NSN GR Downloads) come from [ Only registered users can see links on this board! Get registered or login! ] Yes, it does allow complete control of setting up user groups and then assigning blocks, modules, messages and with NSN GR Downloads, even Downloads and the NSN News, even new articles.

These are excellent tools for managing user groups and access rights. Something Nuke sorely lacks.... however, stay tuned, and RavenNuke76 2.00.00 will be out with NSN Groups already installed, making NSN GR Downloads and NSN News a SNAP to install if you want them.
 
wakey







PostPosted: Thu Dec 22, 2005 6:31 pm Reply with quote

COOLIO!!!!!!!!!! Wave Wave Wave speedtype :clap: :clap: :clap: :clap: :clap: :clap: :clap:

that is the best news i have had today

THANKS

RavensScripts
oh i have kind of hijacted that raven scripts smilie for my page as then i can use you as either a sponcer (even thought you aint) or a advertiser if you dont want me to that is cool
 
restinpeace







PostPosted: Mon Dec 26, 2005 8:54 am Reply with quote

montego wrote:
You have not closed the first large IF statement with an ending } or the function itself.
thanks montego. hehehe
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.9

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©