Welcome to Kuwait Linux User Group - OpenSource free stuff

Search   in  

 Create an AccountHome | Gallery | Submit News | Your Account | Content | Topics | Top 10  

Modules
· Home
· Advertising
· Downloads
· FAQ
· Forums
· PHP-Nuke Tools
· Stories Archive
· Submit News
· Surveys
· Top 10
· Topics
· Tutorials
· Web Links
· Your Account

Search
Google
Web q8linux.net

  

كيف تجعل الزوار يشاهدون التحميل ولاكن لايمكنهم التحميل الا بعد التسجيل في مجلة النيوك.

this allows you to protect/restrict download module to registered users only in phpnuke.

If you want to allow all visitors to see the downloads but only registered users to actually download them follow this:


كيف تجعل الزوار يشاهدون التحميل ولاكن لايمكنهم التحميل الا بعد التسجيل في مجلة النيوك.

-1 اعمل نسخه احتياط من الملف و ثم افتح:

modules/Downloads/index.php

ابحث عن الصطر :look for these lines

function getit($lid) {
global $prefix, $dbi;
sql_query("update ".$prefix."_downloads_downloads set hits=hits+1 WHERE lid=$lid", $dbi);
$result = sql_query("SELECT url FROM ".$prefix."_downloads_downloads WHERE lid=$lid", $dbi);
list($url) = sql_fetch_row($result, $dbi);
Header("Location: $url");
}

 

و غيره الي :Modify it to this :

 

function getit($lid) {
global $prefix, $dbi, $user, $admin;
if (!is_admin($admin)&&!is_user($user)) {
$pagetitle = "- "._ACCESSDENIED."";
include("header.php");
title("$sitename: "._ACCESSDENIED."");
OpenTable();
echo "<center><b>"._RESTRICTEDAREA."</b><br><br>"
.""._MODULEUSERS.""
.""._GOBACK."";
CloseTable();
include("footer.php");
die();
}
sql_query("update ".$prefix."_downloads_downloads set hits=hits+1 WHERE lid=$lid", $dbi);
$result = sql_query("SELECT url FROM ".$prefix."_downloads_downloads WHERE lid=$lid", $dbi);
list($url) = sql_fetch_row($result, $dbi);
Header("Location: $url");
}



meshal @ q8linux

Copyright © by Kuwait Linux User Group - OpenSource free stuff All Rights Reserved.

Published on: 2007-04-09 (270 reads)

[ Go Back ]

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest ©2004-2008 by Q8linux.كويت لينكس
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.09 Seconds