Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> BB2Nuke
Author Message
khaled_dxb
Regular
Regular



Joined: Jan 15, 2007
Posts: 66

PostPosted: Tue Nov 06, 2007 11:19 pm Reply with quote

I've installed the attachment mod on my system and one comment i receive from users is that they would like an indication that there is an attachment (in our case only pictures) attached to a post, and if they're not logged in, they dont see the image - they dont realise there is an image either until they have read a couple of posts in which users refer to the image - so they have to log in etc...

Another is to limit bandwidth of images for registered users.

It's a nice to have i guess...

My question is, where would one modify for this requirement?

Its more like the great feature on this site which will only show links to registered, logged in users and if not, it will show a small box etc....

can i do this for attachments?

Thank!
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Tue Dec 25, 2007 5:28 pm Reply with quote

Did anyone ever get back to you on this (privately or email)? If not, is this still an open issue for you?
 
View user's profile Send private message
sowsteady
Regular
Regular



Joined: Apr 09, 2004
Posts: 87
Location: UK

PostPosted: Tue Dec 25, 2007 7:41 pm Reply with quote

Do you have a solution for that Raven? I'm interested too ...
 
View user's profile Send private message Visit poster's website
Raven







PostPosted: Tue Dec 25, 2007 9:46 pm Reply with quote

sowsteady wrote:
Do you have a solution for that Raven? I'm interested too ...


Not at this time. I just happened upon this unanswered post and we try to not let that happen. So, the first step was to determine if there is/was a need. It looks like there is according to your reply Wink And after doing a little research it seems there is no bb2nuke version that supports bb2nuke beyond 2.0.18. From what I read you need Attachment Mod v2.4.5 which hasn't been ported to nuke.
 
khaled_dxb







PostPosted: Wed Dec 26, 2007 1:20 am Reply with quote

Hi Raven,

Unfortunately i never got any reply about this one... the requirement is still open and in the meantime i have been doing a number of other tweaks and tuneups...

Thanks for your follow up.
 
Raven







PostPosted: Wed Dec 26, 2007 1:40 am Reply with quote

I will be working on it but my priority right now is RavenNuke(tm) v2.2 slated for release the first full week of January.
 
sowsteady







PostPosted: Wed Dec 26, 2007 11:29 am Reply with quote

Raven wrote:
I will be working on it but my priority right now is RavenNuke(tm) v2.2 slated for release the first full week of January.


Ooo! Agree with you there ... v2.2 is priority! Very Happy Wink
 
khaled_dxb







PostPosted: Wed Feb 20, 2008 1:18 pm Reply with quote

Ok, so i have been doing some digging - deep stuff...

I found a file in the following location, looks like it may be what we're looking for here!

modules/Forums/attach_mod/displaying.php

with the following code starting at line 144 in my setup
Code:


/**
* Display Attachments in Posts
*/
function display_post_attachments($post_id, $switch_attachment)
{
   global $attach_config, $is_auth;
      
   if (intval($switch_attachment) == 0 || intval($attach_config['disable_mod']))
   {
      return;
   }

   if ($is_auth['auth_download'] && $is_auth['auth_view'])
   {
      display_attachments($post_id);
   }
   else
   {
      // Display Notice (attachment there but not having permissions to view it)
      // Not included because this would mean template and language file changes (at this stage this is not a wise step. ;))
   }
}


Note the// Display Notice comment and underneath it the reason why it's not included - so, any of you know what that means? what are these file changes mentioned, do you see it as being very complicated to implement?

Thanks!
 
technocrat
Life Cycles Becoming CPU Cycles



Joined: Jul 07, 2005
Posts: 511

PostPosted: Thu Feb 21, 2008 10:32 am Reply with quote

If you look at the code you will see that if the user isn't authorized for download the display_attachments isn't run, ie the else is blank. The reason its blank is because he didn't want to spend the time to make a message to login to view or what ever.

So it looks to me that you have a permissions issue. You probably have the default permission for the forum set so all users have download, hence users that aren't logged in can see them.

_________________
Nuke-Evolution
phpBB-Evolution / phpBB-Evolution Blog 
View user's profile Send private message
khaled_dxb







PostPosted: Thu Feb 21, 2008 9:09 pm Reply with quote

Thanks for the info, one thing i'm curious about is why he says "at this stage, this is not a wise step" ??

I put an echo statement in the else of that code, but my message didnt show up... so i'm guessing that there is really much more to it than just a simple echo statement... im no expert, but i'll keep tinkering to see what i can make it do or until it breaks Smile
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> BB2Nuke

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 ©