Author Topic: [Mod] Popup message when user clicks thumbnail where they have no permission  (Read 76115 times)

0 Members and 1 Guest are viewing this topic.

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
I use 4images v1.74 and is:

Quote
if (!get_file_path($thumb_file_name, "thumb", $cat_id, 0, 0)) {
      $file_src = ICON_PATH."/".get_file_extension($media_file_name).".gif";
      $image_info = @getimagesize($file_src);
      $width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
      $thumb = "<img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".$image_name."\" />";

I have for block in includes/functions.php file ...
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline eddyman1us

  • Newbie
  • *
  • Posts: 35
    • View Profile
yeh so... even I have it in the original functions.php
only thing I didnt paste the entire block  :?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
So ? There is no problem with original ... you post original but you have other real block for edit.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline eddyman1us

  • Newbie
  • *
  • Posts: 35
    • View Profile
Hi , thunderstrike

Can you post the whole functions.php which according to you is working for 1.7.4.
as I mentioned earlier even after modifying the original code it was malfunctioning in my case .

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Quote
after modifying the original code it was malfunctioning in my case .

I no see see error message. Please read step 6 of my signature.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline eddyman1us

  • Newbie
  • *
  • Posts: 35
    • View Profile
its does say error it just doesnt work ... nothing happens when clicked without logging in


Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Quote
its does say error it just doesnt work ... nothing happens when clicked without logging in

In global.php file,

find:

Quote
error_reporting(E_ERROR | E_WARNING | E_PARSE);

replace:

Code: [Select]
//error_reporting(E_ERROR | E_WARNING | E_PARSE);
error_reporting(E_ALL);

Try page again. Please report error message you see (in quote !) .
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline eddyman1us

  • Newbie
  • *
  • Posts: 35
    • View Profile
done still nothing happened  :(
no errors nothing !
check ur pm for url

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [Mod] Popup message when user clicks thumbnail where they have no permission
« Reply #53 on: September 05, 2010, 12:22:52 AM »
@Vano,

Hello and thanks for refering  me to this MOD. This is what I wanted but just to recap, this MOD will give a user a pop up when they try to browse around as a guest and not logged in right??

If so I have installed this MOD and nothing happens. What I mean is that Ive done exactly what this MOD has asked off me and Ive uploaded it to the server sir, and I can still browse around my site as a guest and no popup appears. I thought at first it was the browser, so i tried chrome and its the same on there is well

Am i doing something wrong or is the syntax on my side different from the Code u initially had when implenting this MOD.

thanks sir.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Popup message when user clicks thumbnail where they have no permission
« Reply #54 on: September 05, 2010, 03:15:31 AM »
It doesn't matter guest or member, what matters is what visitor is allowed to see. If they are allowed view category, but not allowed view images, then this popup will be displayed when they try click on a thumbnail (by default it only show thumbnails without any links)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [Mod] Popup message when user clicks thumbnail where they have no permission
« Reply #55 on: September 06, 2010, 01:58:45 AM »
I finally it figured it out  :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) arrrrrrrrrrrrrg 4images is so confusing  :lol:

I had to change the the permissions from private to registered. Vano you told me like 6 months ago, private was the same was registered. I think this needs to be changed, because it always confuses me. If 4images technicailly has only 3 levels of permissions then i think private should be integrate to registered.

Thanks man

***********
update

This mod doesnt seem to work for default thumbnails. I.E http://www.4homepages.de/forum/index.php?topic=24054.0 gives default thumbnails (for example youtube thumbnail)...if the thumbnail of the media site video is not saved. So users can still click on videos with default thumbnails without a pop up coming up


**********
« Last Edit: September 06, 2010, 02:08:52 AM by zakaria666 »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Popup message when user clicks thumbnail where they have no permission
« Reply #56 on: September 06, 2010, 02:28:44 AM »
I think this needs to be changed, because it always confuses me.
Confusion of one person is not enough for changing core of the program :P ;)
And I never said private is the same as registered, I said private can only be used on registered members only (not in these exact words of course). When permissions set to private it automatically deny everyone unless overridden per single member or group. If you think this confusing, try out SMF forum software see for yourself what's more confusing... :?

This mod doesnt seem to work for default thumbnails. I.E http://www.4homepages.de/forum/index.php?topic=24054.0 gives default thumbnails (for example youtube thumbnail)...if the thumbnail of the media site video is not saved. So users can still click on videos with default thumbnails without a pop up coming up
It works just fine. Just look in the new code, you'll see three lines with <img and all three of them have the same onclick= code.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)