[MOD] Image Upload Module (v1.0) -- Now Available

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #41 (permalink)  
Old 07-26-2007, 11:40 AM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 180
Hi XSP,

I haven't tried simon's mod of thickbox and scriptaculous yet but a lot of people have had good results with it. If you didn't use it, you would want to add "upcoming", "index" to that array I mentioned by PM so thickbox would work on those 2 pages as well.

The problem that Peter is having is that the module isn't even being triggered... I originally thought they were related issues.

Though I am still a little confused as I have 9.7 installed with Thickbox and Scriptaculous and they both work perfectly together. Odd.

Best,
Cent
Reply With Quote
  #42 (permalink)  
Old 07-26-2007, 12:03 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 124
Hi Cent.

I can see the thickbox code in the html code of the site, by being triggered you mean that ?

This are the modules I hace active, is there another nedded or that can have conflict with this ?

Modules:

Javascript Effects Pack v0.1 - disable
Admin Modify Language v0.1 - disable
Ajax Contact Form v0.1 - disable
Thickbox v0.1 - disable
Profile Extra Fields v0.2 - disable
Google Adsense Revenue Sharing v0.1 - disable
Image Upload v1 - disable
Lightbox v0.1 - disable

I also commented that the line to change manually, has another line, not the one you said, is that correct ?

Thanks.

Last edited by Peter; 07-26-2007 at 12:09 PM.
Reply With Quote
  #43 (permalink)  
Old 07-26-2007, 02:41 PM
XSP XSP is offline
Casual Pligger
 
Join Date: Jul 2007
Posts: 31
Now that the thickbox is working, I have modified image_upload_settings.php so that it uses smarty variables. In my link_summary.tpl, I have added this:

PHP Code:
{if $pagename neq "story"}
<
a href="{$story_url}"><img src="{$module_imageupload_thumbnail_src}/{$module_imageupload_image_filename}" /></a>
{/if}
{if 
$pagename eq "story"}
<
div><a href="{$module_imageupload_thumbnail_src}/{$module_imageupload_image_filename}" title="{$module_imageupload_image_caption}" class="thickbox"><img border="1" src="/modules/image_upload/plugins/thumb.php?img={$module_imageupload_image_filename}&w=150&h=150" alt="" /></a><center><span style="font: normal 10px verdana, arial;">(click image to enlarge)</span></center></div>
{/if} 
This allows me to have the image thumbnail link to the story on the 'upcoming' and 'published' pages, but on the story page thickbox is invoked.

the problem is that in the thickbox, it shows the thumbnail (150x150 instead of the full size pic. Is there something wrong with the above code?

If I disable the smarty variables and comment out my code above, thickbox displays as it should.

Another interesting thing, with the code above enabled, if I hover over the pic on the story page, I get a link to the thumbail generation code:
http://www.mysite.com/modules/image_...50/img_739.jpg

According to the code, shouldn't it be showing as:

http://www.mysite.com/images/img_739.jpg

??
Reply With Quote
  #44 (permalink)  
Old 07-26-2007, 02:47 PM
XSP XSP is offline
Casual Pligger
 
Join Date: Jul 2007
Posts: 31
Well, I am an idiot.

:-)

The code should read:

PHP Code:
{if $pagename neq "story"}
<
a href="{$story_url}"><img src="{$module_imageupload_thumbnail_src}/{$module_imageupload_image_filename}" /></a>
{/if}
{if 
$pagename eq "story"}
<
div><a href="{$my_pligg_base}/images/{$module_imageupload_image_filename}" title="{$module_imageupload_image_caption}" class="thickbox"><img border="1" src="/modules/image_upload/plugins/thumb.php?img={$module_imageupload_image_filename}&w=150&h=150" alt="" /></a><center><span style="font: normal 10px verdana, arial;">(click image to enlarge)</span></center></div>
{/if} 
The issue now is that I have an image placeholder on every story page. How should I modify this to only affect stories with images uploaded?

Last edited by XSP; 07-26-2007 at 02:53 PM.
Reply With Quote
  #45 (permalink)  
Old 07-27-2007, 04:39 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 124
Hi Cent, I actually completely erase everything from the server and drop all tables from the database, made a clean install and I havent modified anything, just the principal stuff, and I am getting exactly the same, a link to the image.

In thickbox_init.php the line to modify is different as the one you mentioned, is that correct ?

Any ideas why is not working ?

Thanks.
Reply With Quote
  #46 (permalink)  
Old 07-27-2007, 05:31 PM
New Pligger
 
Join Date: Jun 2007
Posts: 12
Quote:
Originally Posted by Peter View Post
Hi Cent, I actually completely erase everything from the server and drop all tables from the database, made a clean install and I havent modified anything, just the principal stuff, and I am getting exactly the same, a link to the image.

In thickbox_init.php the line to modify is different as the one you mentioned, is that correct ?

Any ideas why is not working ?

Thanks.
Yeah, I'm getting the same thing. This was also after a clean install of Pligg 9.7. What actually tells pligg to use the thickbox module when the user clicks on the image preview thumbnail? I guess what I'm asking is what all gets executed after you click on the preview thumbnail that starts the pretty animation for thickbox? Maybe if I knew which files to look at, I can try to trace through and see where it's breaking down.
Reply With Quote
  #47 (permalink)  
Old 07-27-2007, 06:01 PM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 180
Hi,

You can do a simple:

PHP Code:
{if $module_imageupload_filename != ''}
show the thumbnail
{/if} 
Quote:
Originally Posted by XSP View Post
Well, I am an idiot.

:-)

The code should read:

PHP Code:
{if $pagename neq "story"}
<
a href="{$story_url}"><img src="{$module_imageupload_thumbnail_src}/{$module_imageupload_image_filename}" /></a>
{/if}
{if 
$pagename eq "story"}
<
div><a href="{$my_pligg_base}/images/{$module_imageupload_image_filename}" title="{$module_imageupload_image_caption}" class="thickbox"><img border="1" src="/modules/image_upload/plugins/thumb.php?img={$module_imageupload_image_filename}&w=150&h=150" alt="" /></a><center><span style="font: normal 10px verdana, arial;">(click image to enlarge)</span></center></div>
{/if} 
The issue now is that I have an image placeholder on every story page. How should I modify this to only affect stories with images uploaded?
Reply With Quote
  #48 (permalink)  
Old 07-27-2007, 06:14 PM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 180
Hi,

Check the HTML source in the browser to see if the thickbox.js, jquery.js and thickbox.css are being loaded... if they are there, then the problem might be a conflict with scriptalous. There's a post in I think about what to do or you can try the optimized scriptalous/thickbox replacement also in one of these threads.

What actually makes it work is that the a link for the image has a class='thickbox'.

Best,
Cent


Quote:
Originally Posted by twinkiboy View Post
Yeah, I'm getting the same thing. This was also after a clean install of Pligg 9.7. What actually tells pligg to use the thickbox module when the user clicks on the image preview thumbnail? I guess what I'm asking is what all gets executed after you click on the preview thumbnail that starts the pretty animation for thickbox? Maybe if I knew which files to look at, I can try to trace through and see where it's breaking down.
Reply With Quote
  #49 (permalink)  
Old 07-27-2007, 06:16 PM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 180
Please post a link to your site again.

Best,
Cent

Quote:
Originally Posted by Peter View Post
Hi Cent, I actually completely erase everything from the server and drop all tables from the database, made a clean install and I havent modified anything, just the principal stuff, and I am getting exactly the same, a link to the image.

In thickbox_init.php the line to modify is different as the one you mentioned, is that correct ?

Any ideas why is not working ?

Thanks.
Reply With Quote
  #50 (permalink)  
Old 07-27-2007, 06:19 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 124
The HTML has everything needed.

Here it is.



Do you have a link to the modyfied scriptaculous ?

Thanks for the help Cent.

Last edited by Peter; 12-12-2007 at 05:47 AM.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload Module (File and Image Attachment) Yankidank Free Modules 158 Yesterday 04:49 PM
Simple question: Has anyone got the image upload module to work? Citizenslide Questions and Comments 7 07-30-2009 01:44 AM
[MOD] Image Upload Module (v0.93) -- Please test cent Questions and Comments 54 05-01-2009 10:12 PM
Image Upload Module - Really confused thefandango Questions and Comments 3 01-05-2009 11:01 AM
Image Upload Module -- Call for feature requests cent Questions and Comments 12 11-15-2008 12:13 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development