Webmastersite.net
Register Log In

Giving back to the community.
Nifty slideshow using attachements.

Comments on Giving back to the community.

sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Sep 17, 2008 - 9:12 PM:

I just wanted to give back to the WSN community and to Paul.

I spent a couple hours making the attachments load as a javascript based user controllable slide show.
This only works if your attachments are images.

1) Upload the attached javascript file to your wsnclassifieds directory. You can edit the amount of time each photo(attachment) is displayed. Currently it's set at 5 seconds.

2) Place this code in the head of your wrapper.

<SCRIPT type="text/javascript" language="Javascript" src="slide.js"></SCRIPT>
(replace current path to slide.js with your url path)

3)Place the following code (currently styled as simple table) where you want your slide show to appear.


<form name="Oneslideform" >

<table width="400" border="0" cellpadding="2" cellspacing="0">
<tr>
<td width="400" align="center">
<select name="Oneslide" onChange="Onechange();">
<!-- BEGIN LINK ATTACHMENTS -->
<option value="{ATTACHDOWNLOADURL[direct]}">{ATTACHFILETITLE}</option>
<!-- END LINK ATTACHMENTS -->
</select>
<input type=button onClick="Oneprevious();" value="<<" title="Previous" name="button">
<input type=button name="Oneslidebutton" onClick="Oneap(this.value);" value="Start" title="AutoPlay">
<input type=button onClick="Onenext();" value=">>" title="Next" name="button"></td>
</tr>

<tr>
<td bgcolor="#000000" align="center">
<!-- BEGIN 1 LINK ATTACHMENTS -->
<a href="javascript:Onetransport()"><img src="{ATTACHDOWNLOADURL[direct]}" name="Oneshow" border="0"></a>
<!-- END 1 LINK ATTACHMENTS -->
</td>
</tr>

</table>

</form>


The second instance of the Link attachment code is to show the first image attachment uploaded upon initial page viewing. If you do not have this, your page will be blank until user clicks one of the slide show buttons.

4) Moving the slide show select box and buttons is a dicey proposition. I've tried moving it around with nasty results, but feel free to post amends to this slideshow.

Attached Files:
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 70
Total Comments: 211
Posted Sep 17, 2008 - 10:06 PM:

Ive tried deleting the provided code that comes automatically comes on the details.tpl but when I do that, the "begin 1 attachment" portion of my code above crashes and gives me a broken image. Why is that? Any ideas?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Sep 20, 2008 - 2:29 PM:

Cleaned up the HTML, downsized the pictures and added as a switch.

I don't believe there's support for multiple attachment areas on the same page, but a toplist is better here anyway so that non-image attachments can be excluded.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.