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
myrtletrees
Involved
Involved


Joined: Sep 13, 2005
Posts: 259
Location: Cornfields of Indiana

PostPosted: Sun Feb 13, 2011 6:25 pm Reply with quote Back to top

I recently upgraded to 2.40 from 2.30 of Raven Nuke. I had no issues that weren't easily solved.

However, I decided to use the colorbox feature in RN for the attachment mod in the Forums.

I've done as the instructed for adding the class="colorbox" to the <img src line in the viewtopic_attach_body.tpl file.

Here's the issue I am having.

If I attach an image to a post in the forums and then preview before submitting. I can click on the thumbnail image in the preview and it opens the full size image in a nice pop up colorbox with a handy dandy Close button.

HOWEVER, when I submit the post, and then try to click the thumbnail it pops up the nice colorbox, but no full size image ever appears or loads. If I wait long enough, it eventually loads what appears to be ascii text of the binary image file.

I know it sounds weird, but I have no idea what the deal is.

Anyone?

Maybe I missed something?
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Sun Feb 13, 2011 7:22 pm Reply with quote Back to top

In Forum Admin -> Extensions -> Extension Groups Control
Make sure images are set to Download Mode -> Physical

If that does not help, take a look at settings in Forum Admin -> Extensions -> Special Categories

we'll start there Wink
View user's profile Send private message
myrtletrees
Involved
Involved


Joined: Sep 13, 2005
Posts: 259
Location: Cornfields of Indiana

PostPosted: Sun Feb 13, 2011 7:59 pm Reply with quote Back to top

spasticdonkey wrote:
In Forum Admin -> Extensions -> Extension Groups Control
Make sure images are set to Download Mode -> Physical

If that does not help, take a look at settings in Forum Admin -> Extensions -> Special Categories

we'll start there Wink


I changed Download mode for IMAGES to physical and what happens now is the colorbox appears, then disappears and the site loads into a blank page with just the date in the top left corner.

I messed with the Special Categories settings and they made no difference so far.

EDIT: I think part of the issue is when the colorbox works during preview, the link to the image is as such:
Only registered users can see links on this board!
Get registered or login to the forums!


But after submitting the post, the link to the image changes to this:
Only registered users can see links on this board!
Get registered or login to the forums!


It's almost like the colorbox doesn't know what to do with the second link.
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Sun Feb 13, 2011 9:08 pm Reply with quote Back to top

I remember going thru this same issue but it's been so long, having trouble recalling all the details.

open modules/Forums/attach_mod/displaying.php
find this section of code.
Code:
$template->assign_block_vars('postrow.attach.cat_thumb_images', array(
               'DOWNLOAD_NAME'         => $display_name,
               'S_UPLOAD_IMAGE'      => $upload_image,

               'IMG_SRC'            => append_sid($phpbb_root_path . 'download.' . $phpEx . '?id=' . $attachments['_' . $post_id][$i]['attach_id']),
               'IMG_THUMB_SRC'         => $thumb_source,
               'FILESIZE'            => $filesize,
               'SIZE_VAR'            => $size_lang,
               'COMMENT'            => $comment,
               'L_DOWNLOADED_VIEWED'   => $lang['Viewed'],
               'L_DOWNLOAD_COUNT'      => sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']))
            );

try making this change to the IMG_SRC line
Code:
'IMG_SRC'            => $filename,

my TPL file looks like so:
Code:
<a href="{postrow.attach.cat_thumb_images.IMG_SRC}" rel="fightbox"><img src="{postrow.attach.cat_thumb_images.IMG_THUMB_SRC}" alt="{postrow.attach.cat_thumb_images.DOWNLOAD_NAME}" border="0" /></a>

i use a different method to call colorbox with the rel attribute, but I can't exactly remember why. Embarassed Calling the colorbox by other methods (class name) should work as well...


see if that helps, make sure you still have img mode "physical"
View user's profile Send private message
myrtletrees
Involved
Involved


Joined: Sep 13, 2005
Posts: 259
Location: Cornfields of Indiana

PostPosted: Mon Feb 14, 2011 12:14 am Reply with quote Back to top

The:
Code:
'IMG_SRC'            => $filename,

line(s) has been updated in the RN 2.4.0 files.

I'll try the rel= and let you know what comes about.
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Mon Feb 14, 2011 1:43 am Reply with quote Back to top

just so we are clear, you are running 2.4.0 or 2.4.01?
are you saying the line was already changed in your files?

the 2.4.01 im looking at the line looks like

Code:
               'IMG_SRC'            => append_sid($phpbb_root_path . 'download.' . $phpEx . '?id=' . $attachments['_' . $post_id][$i]['attach_id']),

you may be looking at the wrong line. on or around line 821
(postrow.attach.cat_thumb_images appears twice in the code)

if you need to use the rel method of launching the colorbox, this is what mine looks like
Code:
   $(document).ready(function(){
      $(".colorbox").colorbox({opacity:0.65, current:"{current} of {total}"});
      $("a[rel='fightbox']").colorbox({transition:"fade", width:"85%"});
      $(".colorboxSEO").colorbox({opacity:0.50, width:"750", height:"300", iframe:true});
   });


which I added to includes/jquery/jquery.colorbox.php
View user's profile Send private message
myrtletrees
Involved
Involved


Joined: Sep 13, 2005
Posts: 259
Location: Cornfields of Indiana

PostPosted: Mon Feb 14, 2011 7:07 am Reply with quote Back to top

2.40.01

You ever looked at code too long? I think I was there last night.

Went to bed, got up this AM. Read your post and re-checked the displaying.php file. Apparently there is more than one 'IMG_SRC' line in that file... Embarassed

It's working perfectly now.

While I got ya here. What, if any are the advantages of using the rel method you mention versus just calling the colorbox via a class?
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Mon Feb 14, 2011 8:30 am Reply with quote Back to top

I look at code too long all the time Smile I had at one time used the original non-jquery lightbox script with this site, and if memory serves me right, it also used the rel attribute. So it may have been the reason I used rel with colorbox. Using something other than the default colorbox class also allowed me to set the colorbox options differently (wider, etc)
View user's profile Send private message
myrtletrees
Involved
Involved


Joined: Sep 13, 2005
Posts: 259
Location: Cornfields of Indiana

PostPosted: Mon Feb 14, 2011 11:45 am Reply with quote Back to top

So as of now.

# of Views/Downloads counter no longer works.
I'm guessing it is because the script no longer understands the old link to the image:
Only registered users can see links on this board!
Get registered or login to the forums!


Links to attachment files in the User Attachment control panel no longer work Generates a Error 404 page not found.
With this link:
Only registered users can see links on this board!
Get registered or login to the forums!


Question Seems I have modules/Forums twice?

I think I recall reading in another related topic about having to live with the counter not working anymore. But I did not see any mention of the link to the attachment in the UACP not working anymore.
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Mon Feb 14, 2011 4:56 pm Reply with quote Back to top

yes you will have to live with the counter not updating...

and i do not even know where the User Attachment control panel is, lol... did you make edits to that file?
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Mon Feb 14, 2011 5:33 pm Reply with quote Back to top

Just for reference this is the other topic.
Only registered users can see links on this board!
Get registered or login to the forums!


spasticdonkey, it is in the ACP.

I will give the ACP problem a quick one over.
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Mon Feb 14, 2011 5:44 pm Reply with quote Back to top

myrtletrees, have you done what I state here? If not give it a try and let me know how it goes.
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
myrtletrees
Involved
Involved


Joined: Sep 13, 2005
Posts: 259
Location: Cornfields of Indiana

PostPosted: Mon Feb 14, 2011 7:30 pm Reply with quote Back to top

Palbin wrote:
Just for reference this is the other topic.
Only registered users can see links on this board!
Get registered or login to the forums!


spasticdonkey, it is in the ACP.

I will give the ACP problem a quick one over.



It's the UACP, not the ACP where the links to images are broken.


Example: If I go to my User Attachments Control panel, it lists all the attachments I have uploaded to topics. Each attachment is a link to the file, whether it is an image or file.

It shows this link, which is correct:
Only registered users can see links on this board!
Get registered or login to the forums!


However, upon clicking that link it takes me to:
Only registered users can see links on this board!
Get registered or login to the forums!


Also, the link you gave to edit modules/Forums/admin/admin_attachments.php would have no effect on modules/Forums/uacp.php I don't think. Even though, the link to the images/files in Admin ACP are broken too.
View user's profile Send private message
myrtletrees
Involved
Involved


Joined: Sep 13, 2005
Posts: 259
Location: Cornfields of Indiana

PostPosted: Mon Feb 14, 2011 7:44 pm Reply with quote Back to top

You know what is interesting?

I installed EVO Nuke Extreme the other day for a client as a test site. Their distro uses lytebox instead of colorbox and all the features of the attachment mod works. Counter works and all links to attached files work.

Doesn't make me want to switch, but perhaps it may help us figure out the issues with this distro and the attachment mod and using some sort of lytebox or similar with it.
View user's profile Send private message
myrtletrees
Involved
Involved


Joined: Sep 13, 2005
Posts: 259
Location: Cornfields of Indiana

PostPosted: Tue Feb 15, 2011 10:53 am Reply with quote Back to top

I think this is going to end up driving me crazy.

I played some more and actually managed to get a different version of lightbox.colorbox to work too. But I was just curious.

The problems still exists with the current attachment mod and colorbox.

1. Counter does not work (this is OK and not a big deal)

2. Links to attached files is broken in both the Admin Attachment control panel and User Attachment Control panel.

The links appear as:
http://www.xxxxxxxxxx.com/modules.php?name=Forums&file=download&id=20
But the page generated goes to:
http://www.xxxxxxxxxx.com/modules.php?name=ErrorDocuments&file=404&rs=modules/Forums/modules/Forums/files/beach1_151.jpg

If I can just figure out that part of the puzzle, I'll be satisfied.

I'm perplexed as to why I have modules/Forums twice in the broken link. It makes me think I have something configured wrong somewhere or a wrong attachment mod file.
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Tue Feb 15, 2011 11:27 am Reply with quote Back to top

Ok you have beat me into submission Wink

I will try and get this fixed up tonight, and if not tonight defiantly tomorrow.
View user's profile Send private message
myrtletrees
Involved
Involved


Joined: Sep 13, 2005
Posts: 259
Location: Cornfields of Indiana

PostPosted: Tue Feb 15, 2011 11:30 am Reply with quote Back to top

Palbin wrote:
Ok you have beat me into submission Wink

I will try and get this fixed up tonight, and if not tonight defiantly tomorrow.


If you would need SFTP access to my site files and Admin access to my site, I would be more than happy to let you at it.

Just let me know.
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Tue Feb 15, 2011 11:34 am Reply with quote Back to top

If I can not reproduce the problems I will take a look. I will let you know.
View user's profile Send private message
myrtletrees
Involved
Involved


Joined: Sep 13, 2005
Posts: 259
Location: Cornfields of Indiana

PostPosted: Tue Feb 15, 2011 1:02 pm Reply with quote Back to top

WOOT! I think I fixed it.

The culprit file is /modules/Forums/download.php

I started comparing the file from the RN distro against the one from the EVO Nuke Extreme distro. I noticed that in the RN distro's file that lines 394-399 looked like this:
Code:
    $script_name = preg_replace('/^\/?(.*?)\/?$/', '/\1', trim($board_config['script_path']));

    if ($script_name[strlen($script_name)] != '/')
    {
        $script_name .= '/';
    }


However, the download.php from EVO looked like this:
Code:
    //$script_name = preg_replace('/^\/?(.*?)\/?$/', '/\1', trim($board_config['script_path']));

    //if ($script_name[strlen($script_name)] != '/')
    //{
        $script_name .= '/';
    //}


So, I went ahead and commented out the same lines and then uploaded the changed file and VIOLA! Links to the attachment files both work in AACP and UACP.

Do I win a prize?? Very Happy

Now if I can figure out that pesky Views Count... Rolling Eyes
View user's profile Send private message
myrtletrees
Involved
Involved


Joined: Sep 13, 2005
Posts: 259
Location: Cornfields of Indiana

PostPosted: Tue Feb 15, 2011 4:26 pm Reply with quote Back to top

Well, I've decided to focus on another little thing with this mod for now.
The link to the User Attachment Control Panel(UACP) and the Upload Limit box with Upload percentage and getting it on other pages of the forums.

As of now, the only way to get to the UACP is by viewing your own profile in the forums. When you do, you see this nice little added feature that looks like so with a handy dandy link to the UACP:
Image

The code that generates that bit of info is this:
Code:
   <!-- BEGIN switch_upload_limits -->
         <table width="175" cellspacing="1" cellpadding="2" border="0" class="bodyline">
            <tr>
         <td colspan="3" width="175" class="row1" nowrap="nowrap"><span class="gensmall">{L_UPLOAD_QUOTA}</span></td>
            </tr>
            <tr>
               <td colspan="3" width="100%" class="row2">
                  <table cellspacing="0" cellpadding="1" border="0">
                  <tr>
                     <td bgcolor="{T_TD_COLOR2}"><img src="themes/iCGstation/forums/themes/iCGstation/forums/images/spacer.gif" width="{UPLOAD_LIMIT_IMG_WIDTH}" height="8" alt="{UPLOAD_LIMIT_PERCENT}" />f*** ME</td>
                  </tr>
                  </table>
               </td>
            </tr>
            <tr>
               <td width="33%" class="row1"><span class="gensmall">0%</span></td>
               <td width="34%" align="center" class="row1"><span class="gensmall">50%</span></td>
               <td width="33%" align="right" class="row1"><span class="gensmall">100%</span></td>
            </tr>
            </table>
            <b><span class="genmed">[{UPLOADED} / {QUOTA} / {PERCENT_FULL}]</span> </b><br />
            <span class="genmed"><a href="{U_UACP}" class="genmed">{L_UACP}</a></span>
         </td>
      </tr>
      </table>
   <!-- END switch_upload_limits -->


It's located in the themes/THEME/forums/profile_view_body.tpl

If I copy that code to any other forum .tpl file, nothing appears. If I remove the BEGIN and END switches, the Upload Quota box appears, but no percentages and no link to the UACP.

Why does that only work on profile_view_body.tpl ??
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Tue Feb 15, 2011 4:36 pm Reply with quote Back to top

the tpl files are just templates, and require data from the file calling the template. I would look at usercp_viewprofile.php and see what info they are sending to profile_view_body.tpl

you will have to replicate that in whatever files are calling the tpl file(s) you want to add to.
View user's profile Send private message
myrtletrees
Involved
Involved


Joined: Sep 13, 2005
Posts: 259
Location: Cornfields of Indiana

PostPosted: Tue Feb 15, 2011 5:07 pm Reply with quote Back to top

spasticdonkey wrote:
the tpl files are just templates, and require data from the file calling the template. I would look at usercp_viewprofile.php and see what info they are sending to profile_view_body.tpl

you will have to replicate that in whatever files are calling the tpl file(s) you want to add to.


That's pretty much where I headed to no avail. No big deal. I'll try adding the link to the UACP in some other manner.
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-2011 by Raven

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 Modified by the RavenNuke™ Team ::

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

zerosum