inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Jul 9, 2014 8:08:37 GMT -8
set board.
Okay so I've got two questions for this plugin I'm creating.
First of all how would you create in effect a new page (I'm thinking similar to how the Bank/Shop etc new pages are created - I know its by hiding the forum content but I'm not clear how)
Also I would love to know if its even possible for a member to click on a link to start a new thread in a certain board with the tag for an individual as well one other part set in as default. Note the user still has to type the rest of the post and click submit so I don't think this would be against TOS?
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jul 9, 2014 8:21:06 GMT -8
Query string is what you want to use when creating a new page. Just hide the children of "content".
Here's the code from Yootil (examples are out dated though, as it needs to be a query str), feel free to copy the code...
/** * Function: page * Quickly create a blank page that matches a certain URL. * * Parameters: * locate - *string* / *object* This will get matched against the location.href value, can be a string or RegExp object. * document_title - *string* Add onto the current document title. * hide_content - *boolean* By default the children of #content gets hidden, you can override this * * Returns: * *object* yootil.create * * Examples: * yootil.create.page("shop", "Shop"); * * yootil.create.page("shop", "Shop").container("The Shop", "Welcome to the Shop").appendTo("#content"); */
page: function(locate, document_title, hide_content){ var reg = (locate.constructor == RegExp)? locate : new RegExp("\/" + locate, "i"); if(locate && location.href.match(reg)){ if(typeof document_title != "undefined" && document_title.length){ document.title += " - " + document_title; } if(typeof hide_content == "undefined" || hide_content){ $("#content[role=main]").children().hide(); } } return yootil.create; }
How the Monetary System uses it...
yootil.create.page("?monetaryshop", this.settings.text.monetary_shop);
As for your other thing, you will need to do a similar thing, use the query string. The URL would contain the info you want to pass to the reply page. Then, on the reply page, you grab it from the query string (location.search), and do whatever you need to do with it.
http://support.proboards.com/thread/new/96?tag=peter3&somethingelse=apples
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Jul 9, 2014 8:36:33 GMT -8
Thanks for this! I shall see if I can get it all to play without blowing it up in my face!
((Or more likely see how long before I huff and give up even though I don't really want to ask coders to create this)
Would I need to do something specific to say pass a # in or I guess this is more directed at Wormo
If I included the [hash]somethinghere as part of the url would it still get converted to a #tag
Another question - If this is a yes is there a way (short of me creating another field for this) to adjust the tag in code (though thinking of it its likely wise for me to add another field for the tag name
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jul 9, 2014 9:16:18 GMT -8
Boy_WonderDon't give up. Eventually things will just fall into place and become easier. When you say "pass", are we still referring to the URL? If so, then it depends on how the links are getting the variable and value added. If it's existing links on a page, then you will need to check for the query string and either append to it, or add your own query string with your variables and data. If it's links you are building, then you just do it in the build process. I recommend URL encoding (encodeURIComponent / decodeURIComponent) any values that get passed over to the page. Then just decode on the other end. Hash tags do carry over as well, but I would recommend not using that, as you could end up with multiple hash tags (yours and proboards). Keep it clean and simple with name / value pairs. Not sure I quite get what you mean if it will still get converted, as it will need to be extracted from the query string for you to do anything with it. Maybe I'm not understanding you. Try explaining to us your plugin idea if you want to share.
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Jul 9, 2014 9:25:38 GMT -8
Okay what I'm working on as I've found a new way of creating missions that's a lot less strain on me is in effect a missions board. I have the admin user interface made. What I want to happen is say someone wants to take up a mission. They click on an image in the floating sidebar to be taken to the 'board'. This is the new page which will be called Missions Board. The layout done roughly in tables will be something like this Featured Missions (Random from the Autoform) Featured Mission 1 Info here Including link to start a new thread in the Control Room board tagging Director Fury and using the appropriate #tag (eg if its a mission called Black Diamond #BlackDiamond ) & Expand Link to show the full mission dossier Featured Mission 2 Info here Including link to start a new thread in the Control Room board tagging Director Fury and using the appropriate #tag (eg if its a mission called Black Diamond #BlackDiamond ) & Expand Link to show the full mission dossier Missions (Displays all missions) Featured Mission 1 Info here Including link to start a new thread in the Control Room board tagging Director Fury and using the appropriate #tag (eg if its a mission called Black Diamond #BlackDiamond )& Expand Link to show the full mission dossier Mission 2 Info here Including link to start a new thread in the Control Room board tagging Director Fury and using the appropriate #tag (eg if its a mission called Black Diamond #BlackDiamond )& Expand Link to show the full mission dossier Missions 3 etc continue in same style We use Wormos hashtag in posts code to link all mission threads together so none of them get lost
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jul 9, 2014 9:36:46 GMT -8
Boy_WonderAh, Ok. Not sure on how Wormopolis' plugin works, so might be best to wait for him for some advice
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Jul 9, 2014 9:40:40 GMT -8
Right now I'm having troubles how to get information to show on the new page @_@
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jul 9, 2014 9:47:34 GMT -8
Boy_WonderHow are you using the hashtag in posts plugin? Edit: Forget that, figured it out. I couldn't get it to work at first, but now I figured it out (there is a small bug (or it's intentional) in the regex pattern that requires a space or new line (br in this case) after the hash). Right now I'm having troubles how to get information to show on the new page @_@ What does your URL look like with your data?
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jul 9, 2014 9:58:43 GMT -8
I needed a space or newline after the hash or it was adding things unintentionally like punctuation. But had to provide a way to make it where punctuation could be included on purpose. I thought endofstring was in there too though
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Jul 9, 2014 10:02:31 GMT -8
edit I worked it out the problem I think I'm not sure.
I haven't sorted the output yet fully as I want to give an option of if I show a featured missions set or not (Depending on my mood/how many missions etc) so that's so far
$( document ).ready(function() {
var missions= pb.plugin.get('missions_board');
yootil.create.page("?missionsboard", missions.settings.mission_creation);
if (missions.settings.show_featured_missions==="yes"){
var misRand=parseInt(Math.random() * missions.settings.mission_creation.length)
}
});
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Jul 9, 2014 12:10:08 GMT -8
Okay I'm still not getting something obviously - Peter I know you're really busy, I was wondering as this is something new for me (I've mastered appending things to divs prior to this), would there be any chance I could speak on skype some point when you've got some free time (I don't mind if not right now)
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Jul 10, 2014 0:49:40 GMT -8
Boy_WonderI can't promise, but I'll try and get on late this evening
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on Jul 10, 2014 2:48:24 GMT -8
Thank you Peter!
|
|