inherit
201280
0
Jan 6, 2014 16:33:08 GMT -8
poisonshift
Resident Zombie Hunter
8
October 2013
poisonshift
|
Post by poisonshift on Dec 17, 2013 21:50:20 GMT -8
I was wondering if it is at all possible to create a plugin that would allow an administrator to create a new thread as an external link to an outside webpage. I run a forum off of a blog about The Simpsons Tapped Out for mobile devices. Its pretty hard for me to figure out how to integrate the content in a streaming sense. I was thinking that it would be very convenient if I could get a feature that allowed me to directly link to a blog post through a category on my board instead of copy and pasting everything into a new thread then linking to the content.
If you have any other alternatives I would be wildly enthusiastic to hear them. Thank you very much!
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Dec 17, 2013 23:45:01 GMT -8
Well it would certainly be possible with a code like I use to replace the shoutbox name. $(document).ready(function() { var elementsof = document.getElementsByClassName('title-bar') for(aa=0; aa<elementsof.length; aa++) { if (elementsof[aa].innerHTML == '<h2>Shoutbox</h2>') {elementsof[aa].innerHTML = '<h2>Chat</h2>'} } }); Potentially you could change it to $(document).ready(function() { var elementsof = document.getElementsByClassName('link') for(aa=0; aa<elementsof.length; aa++) { if (elementsof[aa].innerHTML.indexOf('">BOARD NAME</a>') > -1) {elementsof[aa].innerHTML = '<a href="EXTERNAL LINK" class="board-link board-5">BOARD NAME</a>'} } }); Then all you would need to do is have two variables, BOARD NAME and EXTERNAL LINK. And when the page finished loading, it would automatically change the links.
|
|
Former Member
inherit
guest@proboards.com
131621
0
Dec 1, 2024 16:27:47 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Dec 18, 2013 6:01:03 GMT -8
Remember it won't work on mobile app
|
|
inherit
201280
0
Jan 6, 2014 16:33:08 GMT -8
poisonshift
Resident Zombie Hunter
8
October 2013
poisonshift
|
Post by poisonshift on Dec 19, 2013 21:04:59 GMT -8
very very cool. I'm going to give it a work up and see what I can do. Thanks a ton!
So would I make a new plugin for this? I'm pretty new to ProBoards. I'm coming out of forumotion
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Dec 20, 2013 0:18:30 GMT -8
Yeah make a new plugin, add a js component and paste that code and add more of these if (elementsof[aa].innerHTML.indexOf('">BOARD NAME</a>') > -1) {elementsof[aa].innerHTML = '<a href="EXTERNAL LINK" class="board-link board-5">BOARD NAME</a>'} or add some code boxes to make it editable by you in the user-interface Which is more complicated to set up but easier in the long run
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,023
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Dec 20, 2013 12:31:41 GMT -8
I was wondering if it is at all possible to create a plugin that would allow an administrator to create a new thread as an external link to an outside webpage. I run a forum off of a blog about The Simpsons Tapped Out for mobile devices. Its pretty hard for me to figure out how to integrate the content in a streaming sense. I was thinking that it would be very convenient if I could get a feature that allowed me to directly link to a blog post through a category on my board instead of copy and pasting everything into a new thread then linking to the content. If you have any other alternatives I would be wildly enthusiastic to hear them. Thank you very much! Proboards V5 already comes with the ability to do this with boards you create and since it is a built-in feature the chances are good it will also work in a mobile environment (although not confirmed by me) Well it would certainly be possible with a code like I use to replace the shoutbox name. $(document).ready(function() { var elementsof = document.getElementsByClassName('title-bar') for(aa=0; aa<elementsof.length; aa++) { if (elementsof[aa].innerHTML == '<h2>Shoutbox</h2>') {elementsof[aa].innerHTML = '<h2>Chat</h2>'} } }); Potentially you could change it to $(document).ready(function() { var elementsof = document.getElementsByClassName('link') for(aa=0; aa<elementsof.length; aa++) { if (elementsof[aa].innerHTML.indexOf('">BOARD NAME</a>' > -1) {elementsof[aa].innerHTML = '<a href="EXTERNAL LINK" class="board-link board-5">BOARD NAME</a>'} } }); Then all you would need to do is have two variables, BOARD NAME and EXTERNAL LINK. And when the page finished loading, it would automatically change the links. Hi again P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓, I sent you a PM re:code
|
|
inherit
201280
0
Jan 6, 2014 16:33:08 GMT -8
poisonshift
Resident Zombie Hunter
8
October 2013
poisonshift
|
Post by poisonshift on Dec 20, 2013 13:45:05 GMT -8
I saw that we can external boards and the like when I started with PB but what I'm trying to do isn't make a category or board that exlinks. Just the thread title, instead of going into the thread it sends you to an external site. That was I can create a board that can contain all of the topics discussed on the blog, whereas if I did it as a category my whole board would be amassed with... well it wouldn't be pretty.
|
|
inherit
201280
0
Jan 6, 2014 16:33:08 GMT -8
poisonshift
Resident Zombie Hunter
8
October 2013
poisonshift
|
Post by poisonshift on Dec 20, 2013 13:54:36 GMT -8
Ugh, I must be dense. I can't seem to get it to work...
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,023
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Dec 20, 2013 19:39:49 GMT -8
I saw that we can external boards and the like when I started with PB but what I'm trying to do isn't make a category or board that exlinks. Just the thread title, instead of going into the thread it sends you to an external site. That was I can create a board that can contain all of the topics discussed on the blog, whereas if I did it as a category my whole board would be amassed with... well it wouldn't be pretty. You could still create a board with the sub-boards being externally linked to the topics discussed on the blog if your concern was organization and keeping the main page categories free of litter. It would be a list of boards instead of a list of topics with the distinct advantage that no code would be needed and (most likely) works for those using the mobile app (an advantage no code/plugin can claim). A code for threads however is very much feasible if you still want to go that route. Ugh, I must be dense. I can't seem to get it to work... The code is looking to change board links not thread links, I'm sure P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ will give you an updated code when he returns
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Dec 21, 2013 1:00:20 GMT -8
Here is the plugin you requested. Please tell me if it works for you. If it does, I will try and add it to the library. (This is my first official plugin) I just added a few more options you might like from my last update as well. Attachments:Thread Linker (1).pbp (1.31 KB)
|
|