Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #41 (permalink)  
Old 07-25-2007, 05:07 PM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 183
Thanks: 24
Thanked 65 Times in 26 Posts
Hi...

I installed 9.7 for some other issue with Image Upload 1.01 and Thickbox 0.3 and both ran without problems.

XSP and Peter's problems sound related. Not sure what the fix is as a new install with the modules worked fine. But I'll help to get them sorted out.

XSP can you send me a link to your site?

Best,
Cent
__________________
All of my modules are developed for free to help support the Pligg community. If you use or feel my modules were helpful to your site and want to thank me, please support the Pligg development team by donating.

Modules: Welcome Private Message (v0.1), Welcome Email (v0.1), Thickbox Module (v0.3), Image Upload (v1.0) & MP3 Upload Module (v0.9)
Reply With Quote
  #42 (permalink)  
Old 07-25-2007, 06:14 PM
XSP XSP is offline
Casual Pligger
 
Join Date: Jul 2007
Posts: 31
Thanks: 5
Thanked 1 Time in 1 Post
No problem, I just sent a PM.
Reply With Quote
  #43 (permalink)  
Old 07-26-2007, 10:10 AM
XSP XSP is offline
Casual Pligger
 
Join Date: Jul 2007
Posts: 31
Thanks: 5
Thanked 1 Time in 1 Post
I made the modification you suggested, and the thickbox works now on the story page.

If it is a conflict between scriptaculous and thickbox should I look into installing simon's optimized thickbox/scriptaculous module?
Reply With Quote
  #44 (permalink)  
Old 07-26-2007, 11:40 AM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 183
Thanks: 24
Thanked 65 Times in 26 Posts
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
__________________
All of my modules are developed for free to help support the Pligg community. If you use or feel my modules were helpful to your site and want to thank me, please support the Pligg development team by donating.

Modules: Welcome Private Message (v0.1), Welcome Email (v0.1), Thickbox Module (v0.3), Image Upload (v1.0) & MP3 Upload Module (v0.9)
Reply With Quote
  #45 (permalink)  
Old 07-26-2007, 12:03 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 125
Thanks: 3
Thanked 1 Time in 1 Post
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
  #46 (permalink)  
Old 07-26-2007, 02:41 PM
XSP XSP is offline
Casual Pligger
 
Join Date: Jul 2007
Posts: 31
Thanks: 5
Thanked 1 Time in 1 Post
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
  #47 (permalink)  
Old 07-26-2007, 02:47 PM
XSP XSP is offline
Casual Pligger
 
Join Date: Jul 2007
Posts: 31
Thanks: 5
Thanked 1 Time in 1 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?

Last edited by XSP; 07-26-2007 at 02:53 PM..
Reply With Quote
  #48 (permalink)  
Old 07-27-2007, 04:39 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 125
Thanks: 3
Thanked 1 Time in 1 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
  #49 (permalink)  
Old 07-27-2007, 05:31 PM
New Pligger
 
Join Date: Jun 2007
Posts: 12
Thanks: 3
Thanked 1 Time in 1 Post
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
  #50 (permalink)  
Old 07-27-2007, 06:01 PM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 183
Thanks: 24
Thanked 65 Times in 26 Posts
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?
__________________
All of my modules are developed for free to help support the Pligg community. If you use or feel my modules were helpful to your site and want to thank me, please support the Pligg development team by donating.

Modules: Welcome Private Message (v0.1), Welcome Email (v0.1), Thickbox Module (v0.3), Image Upload (v1.0) & MP3 Upload Module (v0.9)
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Image Upload Module -- Call for feature requests cent Modification Tutorials 12 11-15-2008 12:13 PM
About the image upload module rockxie Module Support 3 08-05-2008 05:41 PM
Image Upload 0.4 Module ziadchatila Module Support 3 08-05-2008 04:40 PM
[MOD] Image Upload Module (v0.93) -- Please test cent Modification Tutorials 48 05-16-2008 08:08 PM
[MOD] File Upload Module -- seeking requests for features cent Modification Tutorials 3 08-11-2007 04:39 AM


Search Engine Friendly URLs by vBSEO 3.2.0