inherit
87736
0
Apr 7, 2020 23:18:08 GMT -8
Adrian
625
August 2006
piper05
|
Post by Adrian on Jul 20, 2019 7:02:04 GMT -8
Hey guys,
Ok so I found this code and I believe it's a main footer code as it's a newsticker that would connect to the info center. Is there a way to make a plugin out of this to work with proboards now or am I out of luck?
<script type="text/javascript"> <!-- /*News Ticker in Info Center Copyright to Boccy109 Free to distribute as long as this header is intact */
//Enter the current news to be displayed. HTML is allowed. var news="Showdown: +20.86 | PPV: +35.56";
//Enter the name of the News Ticker (will be displayed above the news) var name="Stock Ticker";
//Enter the speed at which the news is to scoll at. (1 to 4 is good enough) var speed="3";
//Enter the image to be displayed to the left of the news (leave blank for no image) var image="http://i46./f137/Croftson2/smackdown20wz1wn1.gif";
//DO NOT EDIT BELOW THIS LINE if(location.href.match(/\.com(\/|.+cgi(\?|#.+|\?\w+=home)?)?$/i)){ var table=document.getElementsByTagName('table'); for(s=0;s<table.length;s++) { if(table[s].className=="bordercolor" && table[s+1].cellPadding=="4" && table[s+2].cellPadding=="3") { itable=table[s+1].insertRow(1).insertCell(0); itable.colSpan="2"; itable.className="catbg"; itable.innerHTML=name; if(image!="") { nRow=table[s+1].insertRow(2); imagecell=nRow.insertCell(0); imagecell.className="windowbg"; imagecell.width="20"; imagecell.height="40"; imagecell.align="center"; imagecell.innerHTML="<img src='" +image+ "' />"; newscell=nRow.insertCell(1); newscell.className="windowbg2"; newscell.align="center"; newscell.innerHTML="<marquee scrollamount='" +speed+ "' scrolldelay='1' width='100%'>" +news+ "</marquee>"; } else { newscell=table[s+1].insertRow(2).insertCell(0); newscell.className="windowbg2"; newscell.align="center"; newscell.colSpan="2"; newscell.height="40"; newscell.innerHTML="<marquee scrollamount='" +speed+ "' scrolldelay='1' width='100%'>" +news+ "</marquee>"; } } } } //--> </script>
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,781
January 2015
msg
|
Post by Lynx on Jul 20, 2019 10:42:46 GMT -8
You could probably use the Random News plugin for this. If you're looking to put it into the Forum Statistics & Info on the home page, you could do something like this: <tr colspan="2"> <td><div class="msg-rnf")></div></td> </tr>
Just insert that where you want it to appear in the table. The news feeder does allow images and HTML, but has the added benefit of allowing you to place it where you want to. The Info center, I believe, is 2 columns wide (maybe elli can verify that?) - hence setting the row to a column span of 2 so the Random News uses the width of the Info center. EDIT: I should specify that the code above should be in the outer table (I think the Info center is tables inside an outer table?).
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jul 20, 2019 10:48:37 GMT -8
Lynx It is two columns. colspan will make this table cell full width like the "Users Online" sections, but it needs to be on a <td> instead of <tr>. Adrian You want to put MSG's snippet under Admin > Themes > Layout Templates > Home. If you want it at the bottom of the Info Center, find this block: <tr class="last"> <td colspan="2"> <table> <tr> <td class="icon">$[image.online_24]</td> <td class="info last"> <table> <tbody> <tr><th>Users Online in the Last 24 Hours</th></tr> <tr><td>$[total_staff_online_24] Staff, <a class="$[view_todays_active_members_link.class]" href="$[view_todays_active_members_link.href]">$[total_members_online_24] Member{if $[total_members_online_24] != 1}s{/if}</a>, $[total_guests_online_24] Guest{if $[total_guests_online_24] != 1}s{/if}.</td></tr> <tr><td> {foreach $[online_user_24]} $[online_user_24]{if $[online_user_24.invisible]} <span class="small">(invisible)</span>{/if}$[online_user_24.comma] {/foreach} {if $[total_online_not_shown_24]} , and <a class="$[view_todays_active_members_link.class]" href="$[view_todays_active_members_link.href]">$[total_online_not_shown_24] more...</a> {/if} </td></tr> </tbody> </table> </td> </tr> </table> </td> </tr> Change the first line <tr class="last"> to just <tr>, then add MSG's snippet under the closing </tr> like this: <tr class="last"> <td colspan="2"><div class="msg-rnf"></div></td> </tr>
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,781
January 2015
msg
|
Post by Lynx on Jul 20, 2019 12:11:28 GMT -8
Thanks, elli! I don't use tables a lot, so wasn't exactly sure where the colspan went - so I learned something new today. Adrian - If you want it somewhere other than at the bottom of the Info center, you'll need to specify exactly where you want it placed, so the code elli gave you can be adjusted for that (as the <tr> will not need the "last" class if it's not at the bottom). If you've got modifications on your Info center code, a link to your forum will help so your Info center can be seen and the code adjusted for that.
|
|
inherit
87736
0
Apr 7, 2020 23:18:08 GMT -8
Adrian
625
August 2006
piper05
|
Post by Adrian on Jul 20, 2019 17:30:31 GMT -8
Ok so I want it above the info center, here's a screenshot of where it use to be. i.imgur.com/E3mNSAp.jpgAnd there's no modifications to the info center.
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jul 22, 2019 14:13:57 GMT -8
Adrian Then you would need to create a new container. Something like this: <div class="container"> <div class="title-bar"><h2>News Ticker</h2></div> <div class="content msg-rnf"></div> </div> And place it above these lines in Admin > Themes > Layout Templates > Home: {if $[show_stats]} <div class="container stats"> ...
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,781
January 2015
msg
|
Post by Lynx on Jul 22, 2019 19:06:10 GMT -8
If you don't like the Random News, the Forum Marquee plugin just got an update that allows user placement. All you would have to do is set the Placement to Custom in the plugin UI, then (using elli's code above) replace this line: <div class="content msg-rnf"></div>
with this (I think - never had 1 <div> with an ID and a Class in it, so someone may need to verify): <div class="content" id="msg_Marquee"></div>
Not sure if it needs 2 <div>'s or not - maybe elli knows.
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jul 23, 2019 7:24:36 GMT -8
Lynx Using an ID and a class on the same element will work, yeah.
|
|
inherit
87736
0
Apr 7, 2020 23:18:08 GMT -8
Adrian
625
August 2006
piper05
|
Post by Adrian on Jul 26, 2019 23:34:21 GMT -8
Oh ok I'll give that a shot first and if it doesn't look good then I'll go back to this .
|
|
inherit
87736
0
Apr 7, 2020 23:18:08 GMT -8
Adrian
625
August 2006
piper05
|
Post by Adrian on Jul 28, 2019 0:42:14 GMT -8
Ok so it works great though there's <<<>>> at the end of the news ticker. Also is there a way to add a pic to left? i.imgur.com/mFWnV53.jpgAnd there's space in between the two sections, is there a way to have it connect between the ticker and info statistics?
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,781
January 2015
msg
|
Post by Lynx on Jul 28, 2019 13:06:42 GMT -8
Ok so it works great though there's <<<>>> at the end of the news ticker. Also is there a way to add a pic to left? i.imgur.com/mFWnV53.jpgAnd there's space in between the two sections, is there a way to have it connect between the ticker and info statistics? The <<<>>> is the indicator for the end of the marquee string. I can see about doing an update to make that optional - but that will have to wait until Tuesday. The Text Line in the marquee allow HTML, so yes, you can add an image there. Just set up your Text Line to something like this: <img src="http://storage.proboards.com/6303556/images/RGSZLuwljrEsfTNEVDuA.png" width=32px height=32px />Test Line 1
Not following what you mean by "there's space between the two sections" - what 2 sections? In it's own container? Between 2 containers?
|
|
inherit
87736
0
Apr 7, 2020 23:18:08 GMT -8
Adrian
625
August 2006
piper05
|
Post by Adrian on Jul 28, 2019 16:34:18 GMT -8
Oh ok gotcha. Ok there's a bit of space between the news ticker and the info statistics.Right under the news ticker bar in the pic. It's small but was hoping the newsticker connects with the info center. Also, I tested with adding an image and it scrolls with the text. I want it to be separate like how it is in the first pic. i.imgur.com/E3mNSAp.jpgLike it's own little container an such if possible.
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jul 28, 2019 16:57:10 GMT -8
Adrian A link to your forum would be helpful, but most likely you need to remove the bottom margin on the container with the ticker. If you update your HTML to: <div class="container news-ticker"> <div class="title-bar"><h2>News Ticker</h2></div> <div id="msg_Marquee" class="content"></div> </div> (Note the new .news-ticker class on .container.) Then you can add this to your stylesheet, Admin > Themes > Advanced Styles & CSS > "Style Sheet": .news-ticker.container { margin-bottom: 0; } .news-ticker.container > .content, .news-ticker.container + .container > .title-bar { -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; }
|
|
inherit
87736
0
Apr 7, 2020 23:18:08 GMT -8
Adrian
625
August 2006
piper05
|
Post by Adrian on Jul 28, 2019 17:51:39 GMT -8
oh ok here's the link wwhefedv2.proboards.comI'll try that Edit: That worked so all it needs is a pic on the left like the other icons.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,781
January 2015
msg
|
Post by Lynx on Jul 29, 2019 5:03:18 GMT -8
oh ok here's the link wwhefedv2.proboards.comI'll try that Edit: That worked so all it needs is a pic on the left like the other icons. The easiest way I know of to do that would be to put a single row table in there. Using elli's code above: <div class="container news-ticker"> <div class="title-bar"><h2>News Ticker</h2></div> <div id="msg_Marquee" class="content"></div> </div>
we'll insert a table, like so: <div class="container news-ticker"> <div class="title-bar"><h2>News Ticker</h2></div> <table class="content"> <tr> <td style="width: 10%;"> <img src="URL_TO_IMAGE"> </td> <td style="width: 90%"> <div id="msg_Marquee"></div> </td> </table> </div>
Now, I have no doubt that there's errors with my code above, so I would suggest you wait until it gets looked over first. Maybe elli will be kind enough to fix it. Thank you, elli!
|
|