68 Classifieds Forums  

Go Back   68 Classifieds Forums > General > HTML, CSS, and Design Help
Register Projects FAQ Members List Calendar Search Today's Posts Mark Forums Read

HTML, CSS, and Design Help Need to ask some questions about your sites html, css, or design? This is the place.

 
Thread Tools Display Modes
  #1  
Old 05-02-2006, 10:41 PM
sleepy sleepy is offline
Senior Member
 
Join Date: Mar 2006
Posts: 110
Default How'd you do that? - www.68classifieds.com/modifications

Hi Eric,

Is it possible to see the html code for your showlisting.tpl and viewlisting.tpl pages on the new http://www.68classifieds.com/modifications classifieds site?

As I am in the process of designing templates for my site and would like to be able to see (and compare) the changes you made to the 'modification' template files ... to the 'default' template files ... to help me get my head around the code.

I would also be interested, if possible, in knowing how you did the funky popup when you click on the image on the viewlisting.tpl

Cheers,
sleepy

v3.0.1
Reply With Quote
  #2  
Old 05-03-2006, 12:38 PM
suzkaw suzkaw is offline
Trained to break arms!
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 2,487
Default

Here is the link to the popup script:
http://www.huddletogether.com/projects/lightbox2/

Attached is our template files if you want to play with them.
Attached Files
template.zip (3.5 KB, 41 views)
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Knowledge Base | User Manuals | My Blog
Reply With Quote
  #3  
Old 05-03-2006, 06:42 PM
sleepy sleepy is offline
Senior Member
 
Join Date: Mar 2006
Posts: 110
Default

Eric,

Thanks a heap!!

sleepy
Reply With Quote
  #4  
Old 06-03-2006, 04:02 AM
thanhminh thanhminh is offline
Junior Member
 
Join Date: Jun 2006
Posts: 1
Cool con ku bu chang

thanks . I hope you will have more
Reply With Quote
  #5  
Old 02-26-2007, 09:41 AM
free2take's Avatar
free2take free2take is offline
Senior Member
 
Join Date: Mar 2006
Location: Ireland
Posts: 172
Default

Thanks for this post, this is an excellent little modification.

I have one question I modified my viewlistings.tpl.php file to replace the following code
PHP Code:
      <td valign="top" class="pformright">
      {if
$viewphotos=="Y"}
              {foreach
from=$data item=image}
                   <
p><a href="#" onMouseOver="window.status='View Large Image';return true" onMouseOut="window.status='';return true" onClick="window.open('{$smarty.const.URL}/viewimage.php?photo={$image.id}','_popup','width=450,height=500,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=no,left=0,top=0,screenx=50,screeny=50');return false"> <img src="thumbs/small_{$image.image}" hspace="5" vspace="5" class="image" border="0" /></a><br />{$image.title}</p>
                {
foreachelse}
             <
img src="images/nophoto.gif" width="100" hspace="5" vspace="5" border="1" />
              {/foreach}
      {/if}
with
PHP Code:
      <td valign="top" class="pformright">
      {if
$viewphotos=="Y"}
            {
html_table_adv loop=$data cols=$cols table_attr='width="100%"' td_attr='align="center" width="120"'}
                <
a href="photos/[[image]]" rel="lightbox[image]" title="[[title]]"><img src="thumbs/small_[[image]]" hspace="5" vspace="5" class="image" border="0" /></a><br />[[title]]
            {/
html_table_adv}                
            {*{foreach
from=$data item=image}
                <
p><a href="#" onMouseOver="window.status='View Large Image';return true" onMouseOut="window.status='';return true" onClick="window.open('{$smarty.const.URL}/viewimage.php?photo={$image.id}','_popup','width=450,height=500,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=no,left=0,top=0,screenx=50,screeny=50');return false"> <img src="thumbs/small_{$image.image}" hspace="5" vspace="5" class="image" border="0" /></a><br />{$image.title}</p>
            {
foreachelse}
                 <
img src="images/nophoto.gif" width="100" hspace="5" vspace="5" border="1" />
            {/foreach}*}
      {/if}
but now I get an error when no photo is available, is there an easy way around this ?

Thanks in advance,
Mully

Great found a solution, here's the code:
PHP Code:
 {if $viewphotos=="Y"}
        {if empty(
$data)}
            <
img src="images/nophoto.gif" width="100" hspace="5" vspace="5" border="1" />
        {else}
            {
html_table_adv loop=$data cols=$cols table_attr='width="100%"' td_attr='align="center" width="120"'}
                <
a href="photos/[[image]]" rel="lightbox[image]" title="[[title]]"><img src="thumbs/small_[[image]]" hspace="5" vspace="5" class="image" border="0" /></a><br />[[title]]
            {/
html_table_adv}
        {/if}
                  {/if}
__________________
www.free2take.net
Don't lose it just reuse it!
V 3.1

Last edited by free2take : 02-27-2007 at 06:15 AM. Reason: Found a solution.
Reply With Quote
  #6  
Old 03-20-2007, 02:16 AM
GPM55 GPM55 is offline
Member
 
Join Date: Feb 2007
Posts: 63
Default

looks cool, but does it have any real purpose? Any negative effects on search engine optimization and not being able to see alt image tags or anything? What happens when java is disabled?
Reply With Quote
  #7  
Old 11-27-2007, 07:16 PM
pauljr pauljr is offline
Junior Member
 
Join Date: Nov 2007
Posts: 15
Default Lightbox not working for me

I really hate to keep posting questions but I have tried everything to get this going on my server but no luck. I'm running IIS 6 with v3.1.1 dev of 68class. I have the Lightbox example running fine (see below). I added these 4 lines to the top of viewlistings.tpl.php and changed the image snip of code to the snip below. I also took Erics showlisting and showlistings2 templates and put them in my template directory to test with. When you hold your mouse over the thumbnails they are still linking to www.buyswapsell.com/# instead of www.buyswapsell.com/photos/[image]


{* Lightbox lines I added *}
<script type="text/javascript" src="javascript/lightbox/js/prototype.js"></script>
<script type="text/javascript" src="javascript/lightbox/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="javascript/lightbox/js/lightbox.js"></script>
<link rel="stylesheet" href="javascript/lightbox/css/lightbox.css" type="text/css" media="screen" />


{* Lightbox lines I Changed near bottom of viewlistings.tpl.php}

<td valign="top" class="pformright">
{if $viewphotos=="Y"}
{if empty($data)}
<img src="images/nophoto.gif" width="100" hspace="5" vspace="5" border="1" />
{else}
{html_table_adv loop=$data cols=$cols table_attr='width="100%"' td_attr='align="center" width="120"'}
<a href="photos/[[image]]" rel="lightbox[image]" title="[[title]]"><img src="thumbs/small_[[image]]" hspace="5" vspace="5" class="image" border="0" /></a><br />[[title]]
{/html_table_adv}
{/if}
{/if}

Example lightbox working:
http://www.buyswapsell.com/javascrip...box/index.html
Reply With Quote
  #8  
Old 11-28-2007, 10:48 AM
Lhotch's Avatar
Lhotch Lhotch is offline
Moderator
 
Join Date: Mar 2006
Posts: 1,883
Default

Quote:
Originally Posted by pauljr View Post

{* Lightbox lines I Changed near bottom of viewlistings.tpl.php}

The comment you have above is most likely your problem. You have your site setup to use viewlisting2.tpl.php.

As for the template files Eric has above, that post was made 5/2006 so I am betting the version of 68C he was suing at the time was likely different than what you are using today, almost a year and a half later.
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Reply With Quote
  #9  
Old 11-28-2007, 04:44 PM
pauljr pauljr is offline
Junior Member
 
Join Date: Nov 2007
Posts: 15
Default

That was indeed what my problem was. I didn't realize viewlisting2.tpl.php was what It was actually using. Thanks for the pointer.
Reply With Quote


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 03:02 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.