PDA

View Full Version : Is it possible to use HighSlide in GARS uploaded pictures ?


stckhlm
12-23-2008, 03:59 PM
I have PhotoPlog Pro installed on my forum. But due to its not very integrated (most of users are not as much as active they are on forum), i would like to use GARS for my "Cd and Dvd Covers section.

With GARS i can do lot of customization. So i beleive it will much better to use GARS instead of PhotoPlog for above mentioned section.

As you know, in PhotoPlog forumdisplay its possible to enlarge the thread thumb by clicking on it. (I guess its below code...)
<script type="text/javascript">hs.registerOverlay({thumbnailId: 'hsjs1', overlayId: 'hscontrolbar', position: 'top right', hideOnMouseOut: true});</script>
<a id="hsjs1" href="http://www.http://www.domain.com/large.picture.url" class="highslide" onClick="return hs.expand(this, {slideshowGroup: 'filebit'})"><img style="padding: 1px; border: 1px solid #CCCCCC;" src="http://www.domain.com/picture.thumb.url" alt="" border="0" /></a>

So i would like to learn if it is possible to use this option for GARS thumb too. With this customization, user will upload the large picture of the thread. Forumdisplay and showthread will still show the thumb of the uploaded picture but when you click it, it will highslide the large picture.

I will appreciate it a lot if you help me to find out an answer for this problem. (Ofcourse if its possible...)

Regards

Morgan
12-26-2008, 12:28 AM
Nope, there is no tutorial for how to add Highslide to GARS so you'd need to take a look at the Highslide documentation here (http://highslide.com/doc.php) for some examples, and then incorporate the one you want into GARS by editing templates and/or code.

stckhlm
12-26-2008, 10:20 PM
Ok lets forget highslide. Is it possible to make the thread thumbnail linked with original uploaded picture. I'm not looking for a module/container which gives the link of the uploaded image. I would like to make it possible to click the thread thumbnail for larger (original uploaded size) picture.

Is that possible ? If yes, can you please let me learn how ?

Morgan
12-30-2008, 04:26 PM
Originals are only saved when using the thumbnail linked with original uploaded picture custom field. Untested but you could try changed var $dooriginal = false; to var $dooriginal = true; in the geek_class_upload.php file to save all originals, and then you would still need to edit the templates to add in the HTML to link to the original image by removing thumb_ from the thumbnail link, the latter of which might require editing code to create an original link by removing the thumb_ bit from the thumbnail link.

stckhlm
01-01-2009, 11:03 AM
I've changed the var $dooriginal = false; line in geek_class_upload.php to var $dooriginal = true;

And after i did below change in GARS_pb template, its now working but showing the thumbnail.

But i have a problem with the "thumb_" bit. I can't find it.
Which template should i edit for removing the thumb_ bit.

Original :
<a href="$post[GARS_header_image]">
<img src="$post[GARS_header_image]" border="0" alt="$post[title]" />$post[GARS_post_header_image]
Changed to :
<a href="$post[GARS_header_image]"><img src="$post[GARS_header_image]" border="0" alt="$post[title]" />$post[GARS_post_header_image]</a>

Above change work for the thread preview. And which template do i have to edit for forumdisplay preview ?

Morgan
01-01-2009, 08:36 PM
The thumb_ bit is set in the gars_class_upload.php file. In the gars_class_edit.php file look for where $uploadedstuff['thumbpath'] is set. If $dooriginal is true, then $uploadedstuff['originalpath'] should also be set. The $header_image variable in the gars_class_edit.php code holds the link to the header image, the header_image field in the gars database table is where the link is stored, and if you are using the GARS_pb template for the first post, then $post[GARS_header_image] holds the link to the header image, where $post['GARS_header_image'] is set in the gars_class_page.php file for the showthread page. Probably the easiest thing to do would be to set a new variable named $post['GARS_header_image_orig'] in the gars_class_page.php file, using str_replace (http://php.net/str_replace) to strip out the thumb_ bit from the $post['GARS_header_image'] variable, and then use $post[GARS_header_image_orig] in the GARS_pb template, assuming that is the template you are using for the first post. For the forumdisplay page, you would need to do something similar with $thread['header_image'] in the GARS_threadbit template and the gars_class_list.php file.