News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Nerdy Request - Aion Syndication

Started by Upem, August 13, 2009, 11:27:58 AM

Previous topic - Next topic

Upem

So I am building a website for a new game about to release and after much research of all the forum software apps I have settled with SMF which was an amazingly awesome choice I simply love this forum.

The deal is, one of the major database websites for the game has started allowing syndication of their content in the form of icons and tooltips on your website by adding a simple script line and some html to your page but its not quite as easy (for a noob like myself) to add to a forum in the form of BBCode. Most people creating the forum addons have only created them for the few popular forum systems, vBulletin, MyBB, and PHPBB. My question is, is it possible to port an addon from one of those systems to SMF? If not, by any chance would anyone playing this game or anyone feeling really generous care to make this addon?

Thanks!


Edit: I had some links to the vBulletin and MyBB addons that were created but I am obviously "not allowed to post external links." If anyone is interested in helping with this I guess I can email or PM you more info.

Arantor

Please try posting a link now.

The problem is that without knowing what form of addon this is, we can't possibly help you.

Upem

I actually got it working for the most part using syndication code from an older game that the same DB site supports, just by replacing a bit of code here and there. Im not sure what you mean by form of addon, kind of new to this? Its BBCode used to display names of objects with a tooltip on hover.



This is what it looks like implemented into vbulletin.
hxxp:www.aionsource.com/forum/aionarmory/18807-syndicaton-goes-live-source.html#post466081 [nonactive]


This is the older code I modified and used.
hxxp:www.wardb.com/syndication/smf-1.1.5_install.html [nonactive]

I replaced all instances of 'wardb' with 'AionArmory' this allowed me to use [spell][/spell], [item][/item], works fine but all of BBCode has to be manually typed (no neat little icons in the post area to click to automatically add the BBCode) Also I couldn't get it to display the spell/item icons that are supposed to show up when using [item=full-large] [/item]. Guess I will wait for someone on AionSource forums to make a complete plugin for SMF although most people just care about vbulletin or mybb.

Arantor

I can take a look into this but it'll be a while before I can get to it - though I don't imagine it should be *that* hard to do.

Upem

That would be great if you took a shot at it, dunno if it will help but here is the links to the two existing plugins so maybe you can strip code from them to make the complete plugin as nice as they have (with BBCode short cuts in post area, icons, etc)

VB Plugin
hxxp:www.aionsource.com/forum/aionarmory/28390-aion-armory-vbulletin-plugin.html [nonactive]

MyBB Plugin
hxxp:www.aionsource.com/forum/aionarmory/28854-aion-armory-mybb-plugin.html [nonactive]

Arantor

Thanks for the links; I'll take a look once I've finished up the mod I'm currently working in.

Largo_npc

I'm looking at doing this too.

I've added a Javascript to the header of my Theme and it works wehn I enter the URL manually, but I want BB code for it and adding custom BBCode is a bit harder in SMF compared to over forum software for some reason.

I've just added the YouTube BBCode mode though so I might pull that apart and change it to add this Aion stuff.

Arantor

The YouTube BBcode is fantastically complex compared to what you want here, I think.

Adding new BBcodes isn't actually that hard - or at least it need not be once you're familiar with it (I just added a new BBcode mod to the site today), though this is a little more complex.

Largo_npc

#8
You're right! I just looked at the YouTube mod code and....SWOOOOOOOOOSH...that's the sound of it going over my head.

EDIT:
Here's how to add the Warhammer Online version. http://www.wardb.com/syndication/smf-1.1.5_install.html
I imagine it's just the same put the links changed, which is fair enough, but this is also for smf 1.1.5 and I'm using SMF 2.0 rc1.2

Arantor

If you want a (much) simpler BBcode mod to take a look at, the ROT13 BBcode demonstrates the framework of a mod, but not one that accepts parameters.

Seriously, folks, put down what you want, and how you want it to work and I'll build it for you.

Largo_npc

Done it on my forum now by manually adding it. I can't figure out how to make a mod.
I essentially just copied the url code in Subs.php and Subs-Editor.php.

http://www.nonplayercharacters.co.uk/index.php?topic=11.0

Arantor

Making a mod is reasonably simple - I linked a simple mod about that shows how you'd package it.

But I'm willing to package up a mod - with extra features - if you let me know what you all want.

Largo_npc

#12
Sure.
Problem with mods for me is that I hate the XML way of doing it. vBulletin was the same.

Anyway, I have the mod working so I'll put here how I got it to work and you can make whatever from it. We do still need the images though.

Open Sources/Subs-Editor.php
Find:
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt['flash']),

Add, Before
'spell' => array('code' => 'spell', 'before' => '[spell]', 'after' => '[/spell]', 'description' => $txt['spell']),
'item' => array('code' => 'item', 'before' => '[item]', 'after' => '[/item]', 'description' => $txt['item']),
'quest' => array('code' => 'quest', 'before' => '[quest]', 'after' => '[/quest]', 'description' => $txt['quest']),
'npc' => array('code' => 'npc', 'before' => '[npc]', 'after' => '[/npc]', 'description' => $txt['npc']),


Open Sources/Subs.php
Find:
array(
'tag' => 'white',
'before' => '<span style="color: white;" class="bbc_color">',
'after' => '</span>',
),


Add, After:
array(
'tag' => 'quest',
'type' => 'unparsed_content',
'content' => '<a class="aiondb-quest-full-small" href="http://www.aionarmory.com/quest.aspx?id=$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'spell',
'type' => 'unparsed_content',
'content' => '<a class="aiondb-spell-full-small" href="http://www.aionarmory.com/spell.aspx?id=$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'item',
'type' => 'unparsed_content',
'content' => '<a class="aiondb-item-full-small" href="http://www.aionarmory.com/item.aspx?id=$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'npc',
'type' => 'unparsed_content',
'content' => '<a class="aiondb-npc-full-small" href="http://www.aionarmory.com/npc.aspx?id=$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),


Find:
$disabled['flash'] = true;

Add, After:
$disabled['item'] = true;
$disabled['quest'] = true;
$disabled['spell'] = true;
$disabled['npc'] = true;


Open Themes\{YOUR THEME}\index.template.php
Find:
</head>

Add, Before:
<script type="text/javascript" src="http://www.aionarmory.com/js/extooltips.js"></script>

It could use some work. We need Images as I said but also the Quest and NPC BBCodes don't get the Name so you end up with a Hyperlink Number. It takes you to the right place though.

EDIT: Here are the images. drop them in your Themes\{YOUR THEME}\images\bbc folder




Largo_npc

There is also a recipe tag, so that would need adding. It would be added in the same way.

Upem

#14
You guys are great! What largo posted looks to be exactly what I need, only problem I see is that I dont have that Subs-Editor file? any suggestions


EDIT: Actually I think I just may wait for Arantor to simplify the entire process with a mod release ;]

Largo_npc

Yeah, I'd wait if I were you mate.
What I posted was for SMF 2.0 RC1.2
If you don't have the Subs-Editor.php file then you'll probably be on version 1.x which I know nothing about. (I know nothing about v2 either, yesterday was the first time I'd even looked at SMF xD)

Arantor

Yeah, it's similar for 1.1 except in Post.template.php.

Did you want the -large and -small variations too? Any other features?

Upem

Yea if you have time to add all the sizes that would be nice.

Largo_npc

I can't think of any other features it would need.

Arantor

I'm going to start on this now - proper packaging with all the features.

When it's approved, I'd appreciate it if anyone could post a similar post on the Aion forum pointing back here, because I won't be monitoring the Aion forum for updates or changes, so if anything needs changing it will need to be directed back here.

Upem

Will do :] You will get full credit as well

Arantor

#21
Just a headsup where things are.

The 1.1 version is complete, it works including the full magic syndication (it's on par with the vBulletin and MyBB versions). It works for all 5 tags, including all the querying.

I asked Upem to confirm on my behalf whether I can reuse the images for the BBcodes - due to how SMF works as far as I know you can't use external images so I will have to include those in the mod itself.

If I find I can't use them, I'll just have to use some alternative icons.

I will modify this to also be 2.0 compatible tomorrow - it's time for bed now.


EDIT: 2.0 version completed too. I'm just waiting on the OK to redistribute the images before supplying the mod for approval.

Largo_npc

Those images are provided for Syndication, so it should be all good to use them

Upem

Not to mention two devs have lurked on my forum post where I am asking permission to use the images but have yet to reply. I honestly dont think they would make a huge deal of it but, if permissions is 100% needed then, we wait :]

Arantor

The issue isn't using them, unfortunately. I'm specifically including them in the mod .zip file - not just hotlinking. So unfortunately I have to have permission to redistribute those files, though of course the site will be credited.

Upem

hxxp:www.aionsource.com/forum/aionarmory/36627-image-use-question-aionarmory-admins-devs.html#post892528 [nonactive] 

Curse Network dev approved.

Arantor


Largo_npc

How long does it usually take for mods to be approved?

Arantor

As long as it takes, I'm afraid. I believe there's a queue of a few days at present though.

Largo_npc

That's fair enough. I just wanted to point it out incase something was wrong :>

Arantor

No, it's still pending approval, I'm afraid.

As soon as it is approved I'll post back - upon approval mod authors receive a PM so I will be notified.

Arantor


Largo_npc

#32
I get a white screen when I try to Install it and before that I get 4 "Modification parse error"'s in the list of files.

Loads of mods are doing this. I'm using 2.0 rc1.2


1. Execute Modification install20.xml Modification parse error
2. Execute Modification install20.xml Modification parse error
3. Execute Modification english.xml Modification parse error
4. Execute Modification english.xml Modification parse error

Arantor

If you're getting that with loads of mods it means there's something astray elsewhere. I note also that you have two lots of modifications being listed - install20.xml and english.xml are both listed twice.

We've seen this reported elsewhere too, and no-one really knows how to fix it right now, I think :(

Largo_npc

That sucks :(

Ah well, I've managed to do the manual install with no problems. Works really well, nice work dude.

Arantor

Thanks :)

Any problems with the mod please do post in its own thread.

Advertisement: