Author |
Message |
restinpeace
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jul 07, 2005
Posts: 3
|
Posted:
Wed Dec 21, 2005 9:22 pm |
|
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&d_op=search&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&d_op=AddDownload\">"._ADDDOWNLOAD."</a>"
." | ";
}
echo "<a href=\"modules.php?name=$module_name&d_op=NewDownloads\">"._NEW."</a>"
." | <a href=\"modules.php?name=$module_name&d_op=MostPopular\">"._POPULAR."</a>"
." | <a href=\"modules.php?name=$module_name&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 ?> |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Thu Dec 22, 2005 9:37 am |
|
You have not closed the first large IF statement with an ending } or the function itself. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
wakey
Hangin' Around
![](modules/Forums/images/avatars/514f91be43a62025d0cf0.gif)
Joined: Dec 18, 2005
Posts: 42
Location: newcastle upon tyne (that is planet earth)
|
Posted:
Thu Dec 22, 2005 6:04 pm |
|
i have found a site that uses this very idea
**RAVEN if you can check it out too****
the site is Only registered users can see links on this board! Get registered or login! 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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
wakey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Dec 22, 2005 6:07 pm |
|
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..... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Dec 22, 2005 6:11 pm |
|
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 http://www.nukescripts.net. 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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
wakey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Dec 22, 2005 6:31 pm |
|
COOLIO!!!!!!!!!!
that is the best news i have had today
THANKS
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 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
restinpeace
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 26, 2005 8:54 am |
|
montego wrote: | You have not closed the first large IF statement with an ending } or the function itself. | thanks montego. hehehe |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|