PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
khaled_dxb
Hangin' Around


Joined: Jan 15, 2007
Posts: 25

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

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: 14928
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
sowsteady
Regular
Regular


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

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

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


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
khaled_dxb
Hangin' Around


Joined: Jan 15, 2007
Posts: 25

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

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.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
sowsteady
Regular
Regular


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

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

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
View user's profile Send private message Visit poster's website
khaled_dxb
Hangin' Around


Joined: Jan 15, 2007
Posts: 25

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

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!
View user's profile Send private message
technocrat
Involved
Involved


Joined: Jul 07, 2005
Posts: 492

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

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.
View user's profile Send private message
khaled_dxb
Hangin' Around


Joined: Jan 15, 2007
Posts: 25

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

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
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum