Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Adding more Forum Code
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Patrigan
Starting Member

2 Posts

Posted - 17 January 2008 :  08:58:21  Show Profile  Reply with Quote
Hi

This is my first post here, so I'm not sure if this is the right place to ask.

I've currently controlling a forum for a hobby store, but recently they have asked me if it's possible to add a new forum code. I didn't know if it was, that's why I come to ask here.

To be precise, what they ask is a code for displaying cards, by simply typing their name (preferably a popup window, or a mouseover) per example
[MTG]Card Name[MTG]
MTG would be the code for cards from Magic: The Gathering. A similar code would be WoW for cards from the WoWTCG. We have all the images already on our server (we have a webshop with pictures), so that shouldn't be a poroblem.

Any ideas or solutions? thanks!

<moved from="Help: General / Current Version (v3.4.xx)" by="Shaggy" /><

Edited by - Shaggy on 18 January 2008 04:29:09

muzishun
Senior Member

United States
1079 Posts

Posted - 17 January 2008 :  09:51:56  Show Profile  Visit muzishun's Homepage  Reply with Quote
You want the ExtraTags function in inc_func_common.asp. Add this line, changing the part in red to whatever HTML you need to display the images/links the way you want.

	fString = doCode(fString, "[mtg]", "[/mtg]", "Start code here", "End code here")

That will do the display part. Obviously if you're grabbing the links from a database based on the text the user puts in between the [mtg][/mtg] tag, you'll need more code to get that. I'm assuming, though, that you already have that code. If not, post back here with more information on how the image files are named and how you want your users to be able to link to the cards.

Hope that helps.<

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 17 January 2008 :  17:26:19  Show Profile  Reply with Quote
Make sure you add the reverse code to inc_func_posting.asp Example:

			fString = replace(fString, "Start code here","[mtg]", 1, -1, 1)
			fString = replace(fString, "End code here","[/mtg]", 1, -1, 1)
<
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 17 January 2008 :  17:33:57  Show Profile  Visit muzishun's Homepage  Reply with Quote
Good catch. Thanks.<

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 17 January 2008 :  17:34:03  Show Profile  Visit AnonJr's Homepage  Reply with Quote
I seem to remember that someone already did something similar to that for a different game, but I can't seem to find the topic at the moment. I'll look again, but you may want to search a little too since you probably have a better idea of the terms that another Magic enthusiast might use. <
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 17 January 2008 :  19:19:02  Show Profile  Reply with Quote
quote:
Originally posted by muzishun

Good catch. Thanks.


I got caught on that once. Won't let it happen again.<

Edited by - phy1729 on 17 January 2008 19:19:16
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 18 January 2008 :  04:28:21  Show Profile  Reply with Quote
quote:
Originally posted by phy1729
Make sure you add the reverse code to inc_func_posting.asp Example:
If the tags are being parsed by the extratags function, you don't need to add the additional code to inc_func_posting.asp; posts are passed through the extratags function when they're pulled from the database, not when they're inserted.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Patrigan
Starting Member

2 Posts

Posted - 18 January 2008 :  08:23:40  Show Profile  Reply with Quote
Thanks guys, I think this will help me a lot already!

I'll look for the similar thing for that other game aswell.<

Edited by - Patrigan on 18 January 2008 08:23:59
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 18 January 2008 :  09:13:28  Show Profile  Visit muzishun's Homepage  Reply with Quote
Glad we were able to get you on the right track. <

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07