Support Forums

How'd you do that? - www.68classifieds.com/modifications

This is a discussion on How'd you do that? - www.68classifieds.com/modifications within the Templates, HTML, CSS, and Design Help forums, part of the General category; 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 ...


Go Back   68 Classifieds Forums > General > Templates, HTML, CSS, and Design Help

Reply
 
Thread Tools Display Modes
Old 05-02-2006, 09:41 PM   #1
Senior Member
 
 
Join Date: Mar 2006
Posts: 83
Rep Power: 24
sleepy will become famous soon enough
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
sleepy is offline   Reply With Quote
Old 05-03-2006, 11:38 AM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 135
Eric Barnes is just really nice Eric Barnes is just really nice
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
File Type: zip template.zip (3.5 KB, 71 views)
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 05-03-2006, 05:42 PM   #3
Senior Member
 
 
Join Date: Mar 2006
Posts: 83
Rep Power: 24
sleepy will become famous soon enough
Default

Eric,

Thanks a heap!!

sleepy
sleepy is offline   Reply With Quote
Old 06-03-2006, 03:02 AM   #4
Junior Member
 
Join Date: Jun 2006
Posts: 1
Rep Power: 0
thanhminh is on a distinguished road
Cool con ku bu chang

thanks . I hope you will have more
thanhminh is offline   Reply With Quote
Old 02-26-2007, 08:41 AM   #5
Senior Member
 
free2take's Avatar
 
Join Date: Mar 2006
Location: Ireland
Posts: 179
Rep Power: 27
free2take is a jewel in the rough
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} 
__________________
v4.08

Last edited by free2take; 02-27-2007 at 05:15 AM. Reason: Found a solution.
free2take is offline   Reply With Quote
Old 03-20-2007, 01:16 AM   #6
Member
 
Join Date: Feb 2007
Posts: 65
Rep Power: 20
GPM55 is on a distinguished road
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?
GPM55 is offline   Reply With Quote
Old 11-27-2007, 06:16 PM   #7
Member
 
 
Join Date: Nov 2007
Posts: 41
Rep Power: 16
pauljr is on a distinguished road
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
pauljr is offline   Reply With Quote
Old 11-28-2007, 09:48 AM   #8
curmudgeon
 
Join Date: Mar 2006
Posts: 5,414
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by pauljr

{* 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

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 11-28-2007, 03:44 PM   #9
Member
 
 
Join Date: Nov 2007
Posts: 41
Rep Power: 16
pauljr is on a distinguished road
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.
pauljr is offline   Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 05:55 AM.


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