inherit
80744
0
Jul 30, 2020 4:42:38 GMT -8
Sam
504
June 2006
sheffieldbus
|
Post by Sam on Nov 11, 2012 13:23:11 GMT -8
Hi, My forum at: www.forum.sy-transport.co.uk currently uses images in the forum fields on the main page. I've tried the previous code and this doesn't seem to work, so would it be possible for someone to change this to make it work with Proboards V5 at all? Code: <script type="text/javascript"><!-- var _images = [ ["announcements", "http://i294./mm102/sytforum/Announcemaints.gif"], ["feedback", "http://i294./mm102/sytforum/Feedback.gif"], ["rulesandguidelines", "http://i294./mm102/sytforum/Rules.gif"], ["busfleetchanges", "http://i294./mm102/sytforum/Bus_Fleets.gif"], ["busservices", "http://i294./mm102/sytforum/Bus_Routes.gif"], ["resources", "http://i294./mm102/sytforum/Resources.gif"], ["modellers", "http://i294./mm102/sytforum/Modellers.gif"], ["roadworks", "http://i294./mm102/sytforum/Disruptions.gif"], ["trash", "http://i294./mm102/sytforum/Trash.gif"] // No comma last line ]; if(location.href.match(/board=/) && !location.href.match(/action=/i)){ for(var tb = document.getElementsByTagName("table"), a = 1; a < tb.length; a++){ if(tb[a-1].className == "bordercolor" && tb .cellPadding == "4" && tb.rows[0].cells[0].colSpan == "2"){ tb.rows[0].cells[0].colSpan = 3; for(var tr = tb.rows, x = 1; x < tr.length; x++){ var id = tr[x].cells[1].firstChild.firstChild.href.split("=")[1]; for(y = 0; y < _images.length; y++){ if(_images[y][0] == id){ var _img = document.createElement("img"); _img.src = _images[y][1]; _img.border = 0; var _cell = tr[x].insertCell(1); _cell.className = "windowbg"; _cell.appendChild(_img); break; } } } break; } } } //--></script>
Thanks, Sam
|
|
inherit
126477
0
Apr 21, 2023 15:18:52 GMT -8
Shrike
Re-appeared briefly after 6 years only to no doubt disappear again.
1,569
June 2008
shrike
|
Post by Shrike on Nov 11, 2012 13:56:01 GMT -8
I'm working on a plugin to show images in place of board descriptions like on this test forum of mine. As well as sliding down, I'm planning to have an option for the text to fade in on top. I can see about adding an option to have the image shown next to the rest of the text like you have it at the moment if you want.
|
|
inherit
80744
0
Jul 30, 2020 4:42:38 GMT -8
Sam
504
June 2006
sheffieldbus
|
Post by Sam on Nov 11, 2012 13:59:01 GMT -8
WOW! That looks fantastic Shrike and if you could do that I'd be very much obliged . I like the style how you have better to mine, so if you could add the option I could try them both out. Would this be extended through to sub-boards also or is it just for the main boards? Thanks, Sam
|
|
inherit
126477
0
Apr 21, 2023 15:18:52 GMT -8
Shrike
Re-appeared briefly after 6 years only to no doubt disappear again.
1,569
June 2008
shrike
|
Post by Shrike on Nov 11, 2012 14:02:34 GMT -8
WOW! That looks fantastic Shrike and if you could do that I'd be very much obliged . I like the style how you have better to mine, so if you could add the option I could try them both out. Would this be extended through to sub-boards also or is it just for the main boards? Thanks, Sam Thank you, and yes, it will be possible to apply to whichever boards you want. There is a component when making the settings page for plugins that provides a tidy, tree-style drop-down of all the boards on the forum, so I'm using that.
|
|
inherit
80744
0
Jul 30, 2020 4:42:38 GMT -8
Sam
504
June 2006
sheffieldbus
|
Post by Sam on Nov 11, 2012 14:06:56 GMT -8
WOW! That looks fantastic Shrike and if you could do that I'd be very much obliged . I like the style how you have better to mine, so if you could add the option I could try them both out. Would this be extended through to sub-boards also or is it just for the main boards? Thanks, Sam Thank you, and yes, it will be possible to apply to whichever boards you want. There is a component when making the settings page for plugins that provides a tidy, tree-style drop-down of all the boards on the forum, so I'm using that. Sounds great to me then and if you can keep me updated when complete I'd really appreciate it.
|
|
inherit
80744
0
Jul 30, 2020 4:42:38 GMT -8
Sam
504
June 2006
sheffieldbus
|
Post by Sam on Nov 12, 2012 14:12:21 GMT -8
Should have added previously, the code in Post 1 is located in the Global Header and the following code is located in the Main Header: <script type="text/javascript"><!-- /* * Images in Board Listings * Created by Triad * support.proboards.com*/ var _images = [ ["sytforum", "http://i294./mm102/sytforum/Announcemaints_Main.gif"], ["buses", "http://i294./mm102/sytforum/Buses.gif"], ["supertram", "http://i294./mm102/sytforum/Supertram.gif"], ["trains", "http://i294./mm102/sytforum/Trains.gif"], ["airtravel", "http://i294./mm102/sytforum/Air.gif"], ["traffic", "http://i294./mm102/sytforum/Surgery.gif"], ["history", "http://i294./mm102/sytforum/History.gif"], ["multimedia", "http://i294./mm102/sytforum/Multimedia.gif"], ["seniorarea", "http://i294./mm102/sytforum/Senior_Members.gif"], ["transportintheuk", "http://i294./mm102/sytforum/UK.gif"], ["staffroom", "http://i294./mm102/sytforum/Staff.gif"], ["archivearea", "http://i294./mm102/sytforum/Archive.gif"], ["general", "http://i294./mm102/sytforum/General.gif"] ]; if(document.title.split(" - ")[1].match(/Home/)){ var a, tr = document.getElementsByTagName("tr"); for(a = 1; a < tr.length; a++){ if(tr .cells[0].colSpan == "5" && tr.cells[0].className == "catbg") tr.cells[0].colSpan = 6; else if(tr.cells[0].colSpan == "2" && tr.cells[0].innerHTML.match(/Forum Name/)) tr.cells[0].colSpan = 3; else if(tr.cells[4] && tr.cells[1].width == "66%"){ var id = tr.cells[1].firstChild.firstChild.href.split("=")[1]; for(y = 0; y < _images.length; y++){ if(_images[y][0] == id){ var _img = document.createElement("img"); _img.src = _images[y][1]; _img.border = 0; var _cell = tr.insertCell(1); _cell.className = "windowbg"; _cell.appendChild(_img); break; } } } } } //--></script>
Thanks, Sam
|
|
inherit
185052
0
Jun 3, 2014 16:57:27 GMT -8
peabody
33
October 2012
peabody
|
Post by peabody on Nov 13, 2012 8:09:06 GMT -8
i would also be very interested in this plug in. Thanks, Shrike!
|
|
Relic
Junior Member
Posts: 243
inherit
179570
0
Apr 9, 2014 20:02:40 GMT -8
Relic
243
May 2012
sin1993
|
Post by Relic on Nov 13, 2012 22:06:15 GMT -8
I will be looking forward to that plugin as well!
|
|
inherit
80744
0
Jul 30, 2020 4:42:38 GMT -8
Sam
504
June 2006
sheffieldbus
|
Post by Sam on Nov 17, 2012 6:18:12 GMT -8
I'm working on a plugin to show images in place of board descriptions like on this test forum of mine. As well as sliding down, I'm planning to have an option for the text to fade in on top. I can see about adding an option to have the image shown next to the rest of the text like you have it at the moment if you want. Not sure if you have heard Shrike, but apparently Ryan is now looking at making this a feature of Version 5 so may be worth waiting - unless you have already started on the coding etc.?
|
|
inherit
126477
0
Apr 21, 2023 15:18:52 GMT -8
Shrike
Re-appeared briefly after 6 years only to no doubt disappear again.
1,569
June 2008
shrike
|
Post by Shrike on Nov 17, 2012 7:33:48 GMT -8
I'm working on a plugin to show images in place of board descriptions like on this test forum of mine. As well as sliding down, I'm planning to have an option for the text to fade in on top. I can see about adding an option to have the image shown next to the rest of the text like you have it at the moment if you want. Not sure if you have heard Shrike, but apparently Ryan is now looking at making this a feature of Version 5 so may be worth waiting - unless you have already started on the coding etc.? Hmm, I hadn't heard about that. I think they were working on fixing a bug about adding images to the board description via UBBC. That or I've missed a post where he said something like that. EDIT: Just noting here (didn't want to bump this thread just yet) that I started on the plugin yesterday and have about 30% done. It should be ready some time next week (possibly the week after).
|
|
inherit
80744
0
Jul 30, 2020 4:42:38 GMT -8
Sam
504
June 2006
sheffieldbus
|
Post by Sam on Nov 17, 2012 7:48:13 GMT -8
Not sure if you have heard Shrike, but apparently Ryan is now looking at making this a feature of Version 5 so may be worth waiting - unless you have already started on the coding etc.? Hmm, I hadn't heard about that. I think they were working on fixing a bug about adding images to the board description via UBBC. That or I've missed a post where he said something like that. I was only going on hearsay, not seen it confirmed from Ryan himself. May as well keep on progressing forward with this then as it seems to be in big demand among members on this forum that want to see this feature introduced. Thanks, Sam
|
|
inherit
126477
0
Apr 21, 2023 15:18:52 GMT -8
Shrike
Re-appeared briefly after 6 years only to no doubt disappear again.
1,569
June 2008
shrike
|
Post by Shrike on Nov 26, 2012 10:09:34 GMT -8
|
|
Relic
Junior Member
Posts: 243
inherit
179570
0
Apr 9, 2014 20:02:40 GMT -8
Relic
243
May 2012
sin1993
|
Post by Relic on Nov 26, 2012 10:16:36 GMT -8
Ooohh, that's so exciting =3 Thank you!
|
|
inherit
80744
0
Jul 30, 2020 4:42:38 GMT -8
Sam
504
June 2006
sheffieldbus
|
Post by Sam on Nov 26, 2012 15:13:54 GMT -8
Works perfectly Shrike, thank you very much for all your effort! PS - How did you "tag" us out of interest? That will be something new to learn for V5. Thanks, Sam
|
|
inherit
126477
0
Apr 21, 2023 15:18:52 GMT -8
Shrike
Re-appeared briefly after 6 years only to no doubt disappear again.
1,569
June 2008
shrike
|
Post by Shrike on Nov 26, 2012 15:22:41 GMT -8
Works perfectly Shrike, thank you very much for all your effort! PS - How did you "tag" us out of interest? That will be something new to learn for V5. Thanks, Sam Thanks, glad to see it fits the bill. You can tag people by typing @username where "username" is their username. If you hover over a link to someone's profile, it shows the tag you'd use in a tooltip. You can also use the button in the posting form which will bring up a member search. Edit: Just noting again that I've updated the plugin to fix the bug that was in Firefox in case people were still using the first version.
|
|