Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: snork13 on March 15, 2006, 08:33:36 AM

Title: BBC Ebay Tag
Post by: snork13 on March 15, 2006, 08:33:36 AM
Link to Mod (http://mods.simplemachines.org/index.php?mod=286)

adds a bbc ebay tag to the post template. Just enter the ebay item in the post and select the ebay bbc tag. It will return the full link to the ebay auction!
Title: Re: BBC Ebay Tag
Post by: Wittsend on March 26, 2006, 03:42:47 AM
Just been playing with this mod...


Great idea...well done snork13


Here's a couple of enhancements to tidy it up.....at least for SMF 1.1 RC2 - Theme Green

Place this Ebay graphic into your theme's bbc folder:-

Themes -
default theme -
images -
bbc -

This will give you a proper "Ebay" button....

Next open the theme's Post.template.php file (save a copy of the original)
seach for "ebay" along that line replace "Ebay Item" with something like "Insert Ebay item number"...
Save and upload to your smf folder....

This will give more info for your users on the mouseover....

This works on our forum here...

S2C forum (http://nhua.co.uk/smf_1-0-5/index.php)

reposted 'cos I put it in the "wrong" place....

Title: Re: BBC Ebay Tag
Post by: Wittsend on March 27, 2006, 09:00:05 AM
....further enhancements......

Maybe you want the Ebay Item to come up within "Ebay.co.uk" instead of Ebay.com

and maybe instead of displaying Ebay Item #12345678 on your forum a nice little Ebay graphic...

Item #12345678



Here's what to do....

Make a copy of the Subs.php file in the Sources folder...

Search for this section in Subs.php (this is the only place "ebay" crops up, so put that in the find field)

Quotearray(
                                'tag' => 'ebay',
                                'type' => 'unparsed_content',
                                'content' => '<a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=$1" target="_blank">Ebay Item #$1</a>',
                   
                        ),
                        array (
                                'tag' => 'ebay',
                                'type' => 'unparsed_equals',
                                'before' => '<a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=$1">',
                                'after' => '</a>',
                        ),

Edit the .com to .co.uk
If you want the graphic add the image tag as shown here....

Quote'content' => '<a href="http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=$1" target="_blank"> <IMG SRC="http://www.URL for your smf forum/Themes/green/images/bbc/ebay.gif">Item #$1</a>',
       
                        ),
                        array (
                                'tag' => 'ebay',
                                'type' => 'unparsed_equals',
                                'before' => '<a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=$1">',
                                'after' => '</a>',
                        ),

The red bit is the URL of where your forum is...
The green bit is your default theme folder and/or the theme folder you are using...
(I'm using Theme Green)

Upload your edited version of Subs.php and bob's your uncle.....

(please make sure you have a working copy of Subs.php before you play)






Title: Re: BBC Ebay Tag
Post by: beemer on March 27, 2006, 09:06:26 AM
Very useful Snork & Wittsend shall be adding this later, as users seem to have so many problems adding a url  :(

Thanx Guys

I'm assuming change both instances of ebay.com to .co.uk  ;)

'content' => '<a href="http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=$1" target="_blank"> <IMG SRC="http://www.URL for your smf forum/Themes/green/images/bbc/ebay.gif">Item #$1</a>',
       
                        ),
                        array (
                                'tag' => 'ebay',
                                'type' => 'unparsed_equals',
                                'before' => '<a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=$1">',
                                'after' => '</a>',
                        ),
Title: Re: BBC Ebay Tag
Post by: Wittsend on March 27, 2006, 02:48:47 PM
Yes, change both instances, sorry should have made that bit clearer...

Title: Re: BBC Ebay Tag
Post by: beemer on March 28, 2006, 03:14:02 AM
Works atreat guys thanx

Added a border="0" to the image for the light background themes

SRC="http://www.yourdomain/Forum/Themes/tp_amber11rc2/images/bbc/ebay.gif" border="0"
Title: Re: BBC Ebay Tag
Post by: aussieholden on April 04, 2006, 09:22:10 PM
Sound like this mod need to be updated to work on RC2 with these added changes.
Title: Re: BBC Ebay Tag
Post by: aussieholden on April 04, 2006, 09:45:32 PM
Mine doesn't display like this in the post's

Item #12345678

Instead it comes out like this

[logo]Ebay Item #http://cgi.ebay.com.au/1998-VS-SERIES-III-V6-HOLDEN-STATESMAN_W0QQitemZ4627892020QQcategoryZ102246QQrdZ1QQcmdZViewItem

Title: Re: BBC Ebay Tag
Post by: Wittsend on April 05, 2006, 07:03:19 AM
Hi aussieholden,


I'm running with SMF 1.1 RC2

I downloaded the mod and it installed just fine with the package installer in the ACP.
My forum has a heavily customised theme.

It all works fine.

So perhaps that's the starting point. Get the original mod installed and working, then work on the extras.

I'm afraid I can offer no real practical help with why the mod isn't working with your setup.




Title: Re: BBC Ebay Tag
Post by: aussieholden on April 05, 2006, 08:44:31 AM
The mod was installed then the changes made and was still the same long link.
Title: Re: BBC Ebay Tag
Post by: beemer on April 05, 2006, 09:07:43 AM
It is also working fine on both my RC2 installs

Post up the changes you made or else I can take a look for you
Title: Re: BBC Ebay Tag
Post by: snork13 on April 05, 2006, 09:47:30 AM
Quote from: aussieholden on April 05, 2006, 08:44:31 AM
The mod was installed then the changes made and was still the same long link.

@aussieholden

This mod was made for 1.1rc2, so no update needed. If you have other mods installed it may be the problem. This mod changes two files, they are:

$themedir/Post.template.php
$sourcedir/Subs.php

The mod only changes the default theme, so if you have a custom theme you will need to change the code manually. Please refer to the ebay_tag.xml file for modifications.

You may want to check your files against the modifications .xml


-snork13
Title: Re: BBC Ebay Tag
Post by: Vinspire on August 03, 2006, 12:07:44 PM
This mod is awesome .... Great additional function on SMF .... Wee ... SMF rock !
Title: Re: BBC Ebay Tag
Post by: bassbass on September 18, 2007, 02:58:40 AM
I am using Enhanced Quick Reply (EQR), it shows the tag button in the regular reply box but not in the EQR box, can some one give me the code and tell me where to insert it so it shoes in the EQR box.  thanks in advance.
Title: Re: BBC Ebay Tag
Post by: GazOutEast on September 27, 2007, 04:41:05 PM
Running SMF 1.1.4

Just tried to install this and got a "package zip is either corrupt or not compatible with SMF - install cancelled" error

When will the zip get updated?  I'd really like to have this one on our forum.

Gaz
Title: Re: BBC Ebay Tag
Post by: sparky33 on April 21, 2008, 01:07:55 AM
I think it would be better if you were able to enter the URL, and then the mod changed it to the action title?

That is what I thought it was going to do when I installed it.
Title: Re: BBC Ebay Tag
Post by: Eclipse16V on May 01, 2008, 02:54:35 PM
Great Mod.

Run it on SMF 2.0 Beta 3.1 Public ? ? ?

Thx
Title: Re: BBC Ebay Tag
Post by: willerby on June 06, 2009, 04:27:58 PM
Can anyone update this to work with SMF 2.0RC1.1 ?

Post.Template.php file works in a different way...

Thanks
Title: Re: BBC Ebay Tag
Post by: rodrico101 on January 12, 2010, 12:09:00 PM
Is there an update for 1.1.11 ??

Thanks,
Rod
Title: Re: BBC Ebay Tag
Post by: kokett on February 15, 2010, 04:28:50 PM
Hi,

it should same code for 1.1.11

I've changed code a bit to use new Ebay Widget "ToGo" - Just insert this into Subs.php instead of original code out of the mod:

        array(
                                'tag' => 'ebay',
                                'type' => 'unparsed_content',
                                'content' => '<object width="355" height="300"><param name="movie" value="http://togo.ebay.de/togo/togo.swf" /><param name="flashvars" value="base=http://togo.ebay.de/togo/&lang=de-de&mode=normal&itemid=$1" /><embed src="http://togo.ebay.de/togo/togo.swf" type="application/x-shockwave-flash" width="355" height="300" flashvars="base=http://togo.ebay.de/togo/&lang=de-de&mode=normal&itemid=$1"></embed></object>',
                        ),
                array (
                                'tag' => 'ebay',
                                'type' => 'unparsed_equals',
                                'before' => '<a href="http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=$1">',
                                'after' => '</a>',
                        ),


Title: Re: BBC Ebay Tag
Post by: joes on October 28, 2011, 06:00:21 PM
I found this thread on google and just wanted to say tnx to kokett kuz it his post was helpful to me :).
This forum could be very useful for me since i got a community under smf forum engine ;).