News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[SOLVED (againx2)] - BBcode to link to images as mouse over?

Started by anewhobby, November 11, 2009, 07:03:34 PM

Previous topic - Next topic

anewhobby

Hi there.

I am looking for a simple (or so it would seam) mod..... I am willing to pay a reasonable fee... It is a non-profit for fun site so if you ask to much I will just say no.. but I am willing to entertain any fair offer.

Description

I run a small site for collector card games. We are looking for a mod that can be used to easy posting and reading of Cards. The idea is this...

to have a BBcode like this when posting a thread
blah blah [c]card name[/c] blah blah

then the card in the thread appears as "blah blah card name blah blah". The idea though is that the image of the card is a MOUSE OVER. So when Mouse Over the bold text you in fact see a pop up of the image associated with it...

There are heaps of cards as well. I have scans of them all.

Any help on this mod would be awesome or even if you know any kind of thing I could use instead... so far we have just been using url links to the cards, but a lot of users do not bother using them. I tried using smiles but as you know that posts in the post the entire image of the card.. making the threads increasingly heavy.

Option 2 Description

If this is to hard maybe I could use Aliases.. . as in when ever a user types in certain text, smf will automatically replace it with other text... so the user types...

blah blah card name blah blah

and SMF replaces card name with.... blah blah card name blah blah

or something like that.. again would be better if instead of linking it is a pop up like I described above.

Permissions

No real permissions... anyuser can use the bbcode and see the images. But I would need something in the admin panel to set it all up. Though I would be happy even if I needed to manually edit a file instead of having a interactive admin thing for adding cards.

Feature Set

um.. sorry but I answered that in the description area... If you need more info.. please respond in here or PM me.



Anyway.. thanks for reading.. please get back to me as soon as possible
Cheers

Arantor


anewhobby

yea that is pretty close.. but it also puts the images themselves in the post... can it also be used to only show the text, and "expando" the image on mouse over....

Also how easy is it to use... we need a auto replace thing like i mentioned or a simple bbcode like [c]card name[/c] otherwise no one will ever use it (if for example they have to type some long massive line of code as well as finding and copy/pasting the url to the image into the thread)

Arantor

You could ask the author about modifying it to do that.

I believe the code is simply [expando]img link[/expando] - but there's a button on the page, they just have to click then paste.

anewhobby

yea, so the poster need to know the urls for every card as well.... . . .

Arantor

Hmm, so it's a lot more than just the mouseover of images.

The real problem with doing this is that it would have to have a database of every card in the game you're working on. Speaking as someone who once started to write a site around that, it's a huge amount of effort to go and set up. I seem to recall getting about 30% of the way through the Magic: The Gathering card list before circumstances (like a hard drive failure) ended the project, after several months of time spent.

anewhobby

I imagine it would work exactly like the smiles work.... except as a mouse over and displaying the text. I see no real problems in setting it up... especially if you can upload "packs" like you can with smilies...

Arantor

Ah, so you want someone to build you an admin system so you can go add it all yourself?

It is going to be a lot of work to create but more than doable.

anewhobby

well i do not mind as long as it works. I would be happy to edit a file manually instead of using some kind of fancy admin thing... I am sure if anyone wishes to attempt this mod will have a better idea on how to make it work than I would....

But as I see it... you would need a database of all the card names, witch also contains the associated image file.

Then you would need some kind of bbcode that looks in the database of card names and loads the appropriate image.. with could be simply loaded though a javascript or something... like that warcraft wowhead mod that a lot of sites use for itemstats.

Arantor

That's exactly the problem: you need that database. Using MTG as an example, there are well over 10,000 unique cards in the MTG set now. The count numbers into the thousands for others too.

Then you have to have that many images too, which is not a small amount of storage (even assuming 20K per card image, which is pretty small, 200,000K = 200 MB)

Building the mod isn't that hard. Building the database of card names and assembling all the images is a huge investment of time. I spent a long enough period of time just pulling semi-automated dumps from Gatherer, and still only got a fraction through the set.

Liam.

Reading through yours and Arantors discussion, I get a wide picture of this (and I myself ran a card forum (for YuGiOh) for a while), and think I could have a go at doing this. What is your budget?

anewhobby

Quote from: iKorp on November 12, 2009, 01:23:04 PM
Reading through yours and Arantors discussion, I get a wide picture of this (and I myself ran a card forum (for YuGiOh) for a while), and think I could have a go at doing this. What is your budget?

I would prefer to discuss costs privately with you in a PM or email.... but like I said this is a "for fun" site... I will pay anything fair.. but I am not a rich man. Even if I pay for it I would like the mod released publicly to the SMF community.

Liam.

Coming back to this, what card game are you doing it for (yes, I've started work on this mod).

anewhobby

Call of Cthulhu The Living Card Game...  and to a lesser extent Call of Cthulhu The Collector's Card Game....

You can get a list of the card images here - http://dl.free.fr/rXPtTDCpi

and I can get you XML lists of the cards.. as the game is only a year old there isn't billions of cards out yet... but if you get the mod working .. I can fill in all the card and link information.. and that I prob should as they released new cards regularly

<----- EDIT

I do not think it will be to hard to do.. you do not need database acess or any of that I am sure it can all be done with a simple BBcode...

Basically there are tonst of free javascript code we could use and put in the header to make the mouse over thing work. Then the BBcode is used to call that javascript, use the user inputs to define a variable, and add that variable to a hardcoded URL?

I imagine all i need to do is take the card name the user puts in to the bbcode and use that to load the image...

So...

These are some examples of the cards.





Bag ManDagonServant of Noderis

So all the images are stored in /cards/card name.jpg

So all the bbcode needs to do is call the javascript in the header and place "card name" in the hardcodes line with would read something like this /cards/%variable.jpg

Dose that make any sense?

<------ edit

Here is a simple javascript that dose the job - http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm

This script dose not work for my needs ... but it is close.. as this one has a hardcoded array as well as some weird text area no need... Still I mean you would know better.. but if it can somhow use the name form the bbcode input form the user (card name) to plug that into the script.. . I still think this could work?

anewhobby

Where can I find some information on writing my own bbcodes?

Liam.

Ahh, I get it, and the XML List may come in useful, so if you can upload that please ;)

Arantor

There are no guides on it that I know of, but it's pretty straightforward.

Just need three questions answered before I can help you:
1. What should it do? It might need some tricky footwork in how the bbcode parser works.
2. Does it add a button into the editor?
2a. If so, what version of SMF are you targetting? The method is different between 1.1.10, 2.0 RC1.2 and 2.0 RC2 (as I found :()

Arantor

Actually some level of DB access WILL be required to store all the cards, because loading an XML file per card... BAD idea on so many levels.

anewhobby

1) It just need to call a javascript I have added to the header.... and bold the text.
2) No

Basically I prefer to use SMF but i may have to move to phpbb3 :(

Here is what I want the BBcode to do

http://www.phpbb.com/community/viewtopic.php?f=72&t=1854805#p11212005

and here is how to do it in phpbb3

http://www.phpbb.com/community/viewtopic.php?f=72&t=1854805#p11214365

anewhobby

I got someone on the phpbb3 fourms to work out a method for doing this for me.....

http://www.phpbb.com/community/viewtopic.php?f=72&t=1854805#p11214365

If someone can adapt this for smf2.. then that would be awesome!!

Advertisement: