phpBay: make entire table cell a link code

Status
Not open for further replies.

radio

Unconsciously competent.
Nov 18, 2007
1,535
48
0
auction2post.com
Lots of people talking about phpBay sites around here lately. If you use the "column" view in the latest version of phpBay, you might find the following code snippet helpful. This should make the entire table cell displaying an aution item clickable (even better in my opinion than just the image/title). The idea is that there is a color change when the cursor enters the region - that should signify an event change, but it doesn't as it's currently coded - unless you keep moving to the clickable links (title or title/image) w/in the cell. This snippet makes the whole cell clickable via javascript. If your visitor has a script blocker, then the image and title become links and there is no.

Copy and paste over everything in the template.column.results.html file (might want to save the orig - but you have it in the zip folder if you have to retrieve it).

HTML:
    <td width="300" align="center" style="word-wrap: break-word;border: 1px solid #eeeeee;font-size:12px;" bgcolor="#ffffff" onmouseover="this.style.cursor='pointer'; this.style.cursor='hand'; style.backgroundColor='%%hover%%';"onmouseout="style.backgroundColor='#ffffff';" onClick="window.open('%%link_url%%');">
<noscript>      <a href="%%link_url%%" target="_blank" rel="nofollow"></noscript>     
<img src="%%image%%" alt="%%alt_title%%" border="0" /><br />
<strong>%%title%%</strong><br /><noscript></a></noscript>
      %%paypal%%   %%currency%%%%price_or_bin%%
</div>    </td>
I tested it last night and today and it appears to be working just fine. Then again, I'm a straight up n00b and this may be all wet.
 


Wow, you answered my question before I could ask it.

Very useful code to increase the amount of clicks. Thank you.
 
Added, lets see if it improves EPC. Because quite frankly my EPC fucking sucks cock.
 
No one gives a shit about valid markup except prissy web designers with egos disproportional to the amount of failure in their life.
 
@Radio: Going to try this out, thanks much.

@Chatmasta: Ahahaahah! Tell it like it is.
 
This looks to be working. Copy and replace everything in template.ebay.results.html

HTML:
<table width="100%" border="0" cellpadding="5" cellspacing="5" bgcolor="%%row%%" onmouseover="this.style.cursor='pointer'; this.style.cursor='hand'; style.backgroundColor='%%hover%%';"onmouseout="style.backgroundColor='%%row%%'" style="font-size:12px;" onClick="window.open('%%link_url%%');">
  <tr>
    <td width="100" align="left"><img src="%%image%%" alt="%%alt_title%%" border="0" /></td>
    <td style="word-wrap: break-word;">
    
    <noscript><a href="%%link_url%%" target="_blank" rel="nofollow"></noscript>
    
    <strong>%%title%%</strong>
    
    <noscript></a></noscript>
    
    </td>
    <td width="20" align="right">%%paypal%%</td>
    <td width="60" align="right">%%bid_or_bin%%</td>
    <td width="100" align="right">%%currency%%%%price_or_bin%%</td>
    <td width="80" align="right">%%date%%</td>
  </tr>
</table>
 
This looks to be working. Copy and replace everything in template.ebay.results.html

HTML:
<table width="100%" border="0" cellpadding="5" cellspacing="5" bgcolor="%%row%%" onmouseover="this.style.cursor='pointer'; this.style.cursor='hand'; style.backgroundColor='%%hover%%';"onmouseout="style.backgroundColor='%%row%%'" style="font-size:12px;" onClick="window.open('%%link_url%%');">
  <tr>
    <td width="100" align="left"><img src="%%image%%" alt="%%alt_title%%" border="0" /></td>
    <td style="word-wrap: break-word;">
    
    <noscript><a href="%%link_url%%" target="_blank" rel="nofollow"></noscript>
    
    <strong>%%title%%</strong>
    
    <noscript></a></noscript>
    
    </td>
    <td width="20" align="right">%%paypal%%</td>
    <td width="60" align="right">%%bid_or_bin%%</td>
    <td width="100" align="right">%%currency%%%%price_or_bin%%</td>
    <td width="80" align="right">%%date%%</td>
  </tr>
</table>

Looks like it is working.
 
Status
Not open for further replies.