Support Forums

Old 07-28-2008, 09:29 AM   #1
Junior Member
 
Join Date: Jun 2008
Posts: 15
Rep Power: 5
roamex is on a distinguished road
Exclamation custom image loader issues please help

Hey i need some help here i am stuck on how to call the proper images. I am trying to edit the code so when an image is clicked on instead of opening a new window it uses a javascript effect. I am trying to find out how to call the image that was uploaded by the user based of add showing. Also may help if i can set the size of image based off uploaded size of image as well. below is the code thats missing the in it the what goes here field.

the file i am editing is veiwlistings.tpl.
PHP Code:
{if $viewphotos=="Y" && $data <> ''}
              {foreach 
from=$data item=image}
                {
literal}
                <
div onclick="dhtmlHistory.add('location1',{message: 'backbox'});countdown()">{/literal}
<
a href="WHAT GOES HERE" rel="lightbox[slide]" caption="{$image.title}">
<
img src="thumbs/small_{$image.image}" hspace="5" vspace="5" class="image" border="0" alt="{$image.title}" /></a>{$image.title}
</
div>

                {
foreachelse}
             <
img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/nophoto.gif" width="100" hspace="5" vspace="5" border="1" />
              {/foreach}
      {else}
          <
img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/nophoto.gif" width="100" hspace="5" vspace="5" border="1" />
      {/if} 
Any help from anyone would be nice thanks.
roamex is offline   Reply With Quote
Old 07-28-2008, 09:37 AM   #2
Coder
 
Join Date: Mar 2006
Posts: 4,574
Rep Power: 111
Lhotch is just really niceLhotch is just really nice
Default

In the default template the href point to another script which opens the image in a new window.

If you want to just link to the image then you need to ask yourself...."Self, where are the images stored?".

The answer is in the /photos directory on your server.

If you take a queue from the link to the thumbnail image you can see that......

src="thumbs/small_{$image.image}"

Where is the /thumbs folder? Its in the root of the 68C install just like /photos.

Look in /thumbs, whats in there? A series if small images that all have the name small_<somenamehere>.jpg.

By that one could conclude that {$image.image} is the actual name of the photo and if you know the full size photos are stored in /phtotos then what does that tell us?

href="photos/{$image.image}"

should probably do the trick.
__________________
Larry.
Lhotch is offline   Reply With Quote
Old 07-28-2008, 09:36 PM   #3
Junior Member
 
Join Date: Jun 2008
Posts: 15
Rep Power: 5
roamex is on a distinguished road
Default

wow i guess that makes sense lol. don't i feel like a tool. Thanks a lot.
roamex is offline   Reply With Quote

Bookmarks

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 setting and uploading Sharon v4 Questions & Support 4 06-02-2008 09:20 PM
Mod: Favorites Image Fix crystal Modules / Plugins / Modifications 5 05-27-2008 02:59 PM
Image and Database Problems discguy v4 Questions & Support 7 04-24-2008 01:51 PM
Image Browse error CHRD v3.1 Questions & Support 1 02-16-2007 02:28 PM
Major Image Issues CB v3.1 Questions & Support 10 09-19-2006 04:49 PM


All times are GMT -4. The time now is 03:56 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0