Former Member
inherit
guest@proboards.com
236829
0
Nov 22, 2024 21:36:33 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Sept 10, 2016 7:37:29 GMT -8
Hi, I'm making a buy-and-sell forum and I made links to future boards. I made a link called "Sell Something" and I want it a pop-up to appear when clicked and say, "What are you selling?" and some options will appear (homemade, etc). When you click one, it takes you to that board. How do I get to do this? PS Someone on another thread is helping me, she said to post it here. I'm waiting for her answer Also, answering your question.... The link is in the navbar, in welcome PM, and will appear in boards. I haven't made to where it goes yet, but I'm working on it now.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,846
January 2015
msg
|
Post by Lynx on Sept 10, 2016 8:02:12 GMT -8
Hello, @quadrill. The first thing you will need to do is to make sure you already have your boards set up, as you will need their ID number. This is simple to get. When you click on any board (I will use the Support Board here for this example), your browser address bar will display a link like this: support.proboards.com/board/44/support-boardSee the 44 after the /board/ part? That 44 is the board ID number. Once you have your board ID numbers, you can then use this code: <script> $(document).ready(function() { var sellTitle = "What are you selling?"; var link1 = "<a href=\"/board/1\" target=\"_self\">Plugin Library</a>"; var link2 = "<a href=\"/board/9\" target=\"_self\">Plugin Support Threads</a>"; var link3 = "<a href=\"/board/11\" target=\"_self\">Plugin Development</a>"; var linkContent = link1 + "<br /><br />" + link2 + "<br /><br />" + link3; $('#navigation-menu > ul').append('<li><a href=\"#\" class=\"nav-selling\">Sell Something</a></li>'); $('.nav-selling').on('click', function() { pb.window.alert(sellTitle, linkContent, { minHeight: 400, minWidth: 600, }); }); }); </script>
I'll post the same thing below, but with line numbers (so you don't have to take them out from the above code) 01. <script> 02. $(document).ready(function() { 03. var sellTitle = "What are you selling?"; 04. var link1 = "<a href=\"/board/1\" target=\"_self\">Plugin Library</a>"; 05. var link2 = "<a href=\"/board/9\" target=\"_self\">Plugin Support Threads</a>"; 06. var link3 = "<a href=\"/board/11\" target=\"_self\">Plugin Development</a>"; 07. var linkContent = link1 + "<br /><br />" + link2 + "<br /><br />" + link3; 08. 09. $('#navigation-menu > ul').append('<li><a href=\"#\" class=\"nav-selling\">Sell Something</a></li>'); 10. $('.nav-selling').on('click', function() { 11. pb.window.alert(sellTitle, linkContent, { 12. minHeight: 400, 13. minWidth: 600, 14. }); 15. }); 16. }); 17. </script>
Line 03: Change the text in between the quotes to what you want as the title of the popup. This shows when the popup displays in its title bar area. Lines 04, 05 and 06: This is where you set up the links and the text displayed for the link. You'll notice the /board/# in there - be sure to replace the # used here to your actual board ID number. The text in between the > and </a> (such as Plugin Library) is the text link - this is what they will click to be taken to the board. Adjust this accordingly to your forum. If more links are needed, they can be added. I only used 3 for this example. Line 07: This combines Lines 04 through 06 to be the content displayed in the popup. Line 09: This adds the link to the navbar. Change the Sell Something to the desired name you want as the link name in the navbar. Lines 12 and 13: You can set the minimum height and minimum width of the popup here. It will get bigger if needed, but it won't be any smaller than these settings. If you need any help with this, just let me know in this thread. EDIT: Click the link in my signature to go to my test forum. You'll see a Sell Something link in the navbar you can test out. If you go to the Plugin Support Thread board, you'll notice another navbar link - that one is done with my plugin and can be customized as well (to have links and so forth).
|
|
Former Member
inherit
guest@proboards.com
236829
0
Nov 22, 2024 21:36:33 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Sept 10, 2016 8:12:04 GMT -8
Okay, thank you sooo much! I'm about to try it out now. One thing: where do I put all the code?
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,846
January 2015
msg
|
Post by Lynx on Sept 10, 2016 8:14:08 GMT -8
Oooops! Sorry, @quadrill!
The code goes into your Global Header (Admin > Structure > Headers & Footers > click Global Headers & Footers > then paste in Global Header section).
|
|
Former Member
inherit
guest@proboards.com
236829
0
Nov 22, 2024 21:36:33 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Sept 10, 2016 8:54:57 GMT -8
Thank you!!! I've tested it out and it works!!!! Thanks
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,846
January 2015
msg
|
Post by Lynx on Sept 10, 2016 9:11:18 GMT -8
Glad I could be of help, @quadrill. As I said, if you need to add more links, you can do that - you're not stuck with just 3. Also, if you want it a bit more creative, you can also have the links start a new thread in the appropriate board. It all depends on how you want to configure it. If you run into any issues with it, just let me know here.
|
|