Card Tag

The place to test your signature, avatar or anything else
Forum rules
Please make sure you've read the Board Policies forum, which spells out the rules and guidelines of this forum.

Re: Card Tag

Postby SV Pocket PC » Wed Jan 27, 2010 3:39 am

mpg187 wrote:How did you make GoBlue link to that URL?

The way I discussed in this post. I didn't post the actual code because it's more modular, but it's basically a bunch of JavaScript IF-THEN statements.

If you mean more generally, I used a phpBB custom BBCode to generate JavaScript. If you do a View Source on the first page, you'll see this:

Code: Select all
<span style="font-weight: 700; background-color: rgb(176, 176, 176);" onmouseover="Tooltip('GoBlue', '', '', 0)" onmouseout="HideTooltip()">
GoBlue
</span>

The CARD BBCode tag generated that code. When you hover over the text, "GoBlue" is passed to the JavaScript Tooltip function (which is included in overall_header.html), which contains the IF-THEN mapping mentioned above. Once the URL is constructed, the JavaScript displays the tooltip with the image inside it.

Steve
Silicon Valley Pocket PC
http://www.svpocketpc.com
User avatar
SV Pocket PC
Site Admin
 
Posts: 204
Joined: Sun Sep 26, 2004 1:39 pm
Location: Hollister, CA

Re: Card Tag

Postby mpg187 » Wed Jan 27, 2010 4:12 pm

Oh, so the java script is in the custom BB Code? So the full URL to the image is in the HTML for the BB Code card?
Proud HTC Touch Owner (Windows Mobile 6.1 Professional)
http://operation420.net
User avatar
mpg187
Admin Wannabe
 
Posts: 139
Joined: Wed Aug 12, 2009 7:30 pm
Location: By my PSP, and HTC Touch

Re: Card Tag

Postby SV Pocket PC » Thu Jan 28, 2010 7:22 am

mpg187 wrote:Oh, so the java script is in the custom BB Code? So the full URL to the image is in the HTML for the BB Code card?

Not quite. The custom BBCode is just HTML that causes a call to a JavaScript function. The JavaScript function takes the text and turns it into the real URL, but that JavaScript is included in overall_header.html (not the BBCode HTML).

Steve
Silicon Valley Pocket PC
http://www.svpocketpc.com
User avatar
SV Pocket PC
Site Admin
 
Posts: 204
Joined: Sun Sep 26, 2004 1:39 pm
Location: Hollister, CA

Re: Card Tag

Postby mpg187 » Mon Feb 01, 2010 11:06 am

So the custom BB Code HTML calls the javascipt you put into overall_header.html that converts it to the real URL?

So it's custom BB Code combined with style edits.
Proud HTC Touch Owner (Windows Mobile 6.1 Professional)
http://operation420.net
User avatar
mpg187
Admin Wannabe
 
Posts: 139
Joined: Wed Aug 12, 2009 7:30 pm
Location: By my PSP, and HTC Touch

Re: Card Tag

Postby SV Pocket PC » Tue Feb 02, 2010 6:07 am

mpg187 wrote:So the custom BB Code HTML calls the javascipt you put into overall_header.html that converts it to the real URL?

So it's custom BB Code combined with style edits.

Technically, yes, but it's a simple edit to overall_header.html. And I only did it that way because I was worried that including the JavaScript function in the HTML replacement text itself would cause problems. You'd certainly be wasting space if there were more than one CARD tag per page.

Steve
Silicon Valley Pocket PC
http://www.svpocketpc.com
User avatar
SV Pocket PC
Site Admin
 
Posts: 204
Joined: Sun Sep 26, 2004 1:39 pm
Location: Hollister, CA

Previous

Return to Testing

Who is online

Users browsing this forum: CommonCrawl [Bot], Majestic-12 [Bot] and 3 guests