TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,972
  • Latest: Lineo
Stats
  • Total Posts: 196,144
  • Total Topics: 21,346
  • Online today: 633
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 173
  • Total: 173

[hack] TP Downloads - Guests View Only Mod

Started by akulion, December 27, 2006, 03:54:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dermot


Yeah i noticed this is now broken, any idea if you will make this work?

Dermot


Actually after some tweaking i did get it to work. thanks

This is slightly tweaked to work on 0.9.8 on smf 1.1.2




Michelle_Reed


Uber_Tiny

Beautiful hack there man!!

Great job  :up:


marzi

I have manually installed the  [hack] TP Downloads - Guests View Only Mod to a slightly earlier version combination:: SMF 1.1 RC3 and TinyPortal v0.9.6beta
Originally I had downloads set up to permit guests to download some files while others were reserved (and hidden) for members only.
With the Guests View Only Mod installed, guests can view but not download files-as promised-and  the Popup screen works just fine. The problem is that now all the download files are view only, even the ones that the public were previously permitted to download.

So this is my thought;
if the conditional statement is changed to included the authorID, shouldn't the code-hack be able to do what I thought it could originally? For example, I think the following code should be able to allow all uploads to be displayed to the public and members alike, but those that were uploaded by authorID 1 will be able to be viewed by guest but only be able to be downloaded by members....all others (guests) will get the warning popup screen. The problem is that the following code does not quite do it.
If anyone has a minute and any interest to look at it and give me your thoughts I would be grateful. If not, I understand.
global $user_info;
    if (($user_info['is_guest'])&&($context['TPortal']['dlaction']=='item')&&($context['TPortal']['authorID']=='1'))


IchBin


adnan

I mean that can I download this mod from download center or files which attached  in this topic is newer than it ?

IchBin


This website is proudly hosted on Crocweb Cloud Website Hosting.