inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Jan 7, 2013 14:12:53 GMT -8
I have this code (main footer) of v4.5 and was wondering if a mod of some kind can be done for the v5? <script type="text/javascript"> /* locked board message */ if(pb_username == 'Guest') { var mes='Please <a href="?action=login"><u> Login</u></a> or <a href="?action=register"><u>Register</u></a> To View This Area';//Message For Guests } else { var mes='No Threads Posted Yet!';//Message For Members }
var td=document.getElementsByTagName("td"); for(e=0;e<td.length;e++){ if(td[e].width=="24%" && td[e].className=="windowbg2" && td[e].firstChild.innerHTML.length<2){ td[e].innerHTML=mes; td[e].vAlign="middle"; } } </script> Example:
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Jan 10, 2013 16:20:58 GMT -8
*bump*
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Jan 13, 2013 11:42:47 GMT -8
*bump*
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Jan 18, 2013 15:21:57 GMT -8
*BUMP*
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Jan 20, 2013 17:03:05 GMT -8
*bump*
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Jan 20, 2013 20:33:38 GMT -8
Board List Template.
Replace this;
<td class="latest last"> {if $[board.posts] > 0} {if $[board.last_thread]} $[board.last_thread.recent_link]<br /> by $[board.last_thread.last_post.created_by_user]<br /> <span class="date">$[board.last_thread.last_post.date]</span> {/if} {else} No posts have been made on this board. {/if} </td>
With this;
<td class="latest last"> {if $[current_user.is_member]}{if $[board.posts] > 0} {if $[board.last_thread]} $[board.last_thread.recent_link]<br /> by $[board.last_thread.last_post.created_by_user]<br /> <span class="date">$[board.last_thread.last_post.date]</span> {/if} {else} No posts have been made on this board. {/if} {else} Please <a href="https://www.proboards.com/login/XXXXXXX" target="_parent">Login</a> or <a href="https://www.proboards.com/register/XXXXXXX" target="_parent">Register</a> to view this area. {/if} </td>
Now, see the parts in red? You'll have to fill them in yourself. Because the $[login_link] and $[register_link] variables aren't available in the Board List template, they won't work. To find the number you need to apply here, just hover over the login/out/register link on your forum, and the URL it sends you to (usually appears somewhere in browser, if not, copy the link and paste it somewhere you can look at it) is the one you want.
That there should do what you want. =]
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Jan 21, 2013 8:28:33 GMT -8
Hello Paul... It did not work and here is what I have: <table class="list" role="grid"> <thead> <tr> <th class="icon"></th> <th class="main">Board</th> <th class="threads">Topics</th> <th class="posts">Posts</th> <th class="latest last">Last Post</th> </tr> </thead> <tbody> {foreach $[board]} {if !$[board.is_redirect]} <tr id="$[board.content_id]" class="$[board.content_class]"> <td class="icon">$[board.icon]</td> <td class="main clickable"> <span class="link"><a href="$[board.href]">$[board.display_name]</a></span><br /> <p class="description">$[board.description]</p> {if $[board.num_mods]} <p class="moderators"> Moderator{if $[board.num_mods] != 1}s{/if}: {foreach $[board.moderator_group]}$[board.moderator_group.comma_before] $[board.moderator_group]{/foreach}{if $[board.moderator]}{if $[board.moderator_group]}, {/if}{/if} {foreach $[board.moderator]}$[board.moderator]$[board.moderator.comma] {/foreach} </p> {/if} {if $[board.sub_board]} <p class="sub-boards"> Sub-board{if $[board.sub_board] != 1}s{/if}: {foreach $[board.sub_board]}$[board.sub_board]$[board.sub_board.comma] {/foreach} </p> {/if} </td> <td class="threads">{if $[board.threads] == -1}N/A{else}$[board.threads]{/if}</td> <td class="posts">{if $[board.posts] == -1}N/A{else}$[board.posts]{/if}</td> <td class="latest last"> {if $[current_user.is_member]}{if $[board.posts] > 0} {if $[board.last_thread]} $[board.last_thread.recent_link]<br /> by $[board.last_thread.last_post.created_by_user]<br /> <span class="date">$[board.last_thread.last_post.date]</span> {/if} {else} No posts have been made on this board. {/if} {else} Please <a href="https://www.proboards.com/login/4855698" target="_parent">Login</a> or <a href="https://www.proboards.com/register/4855698" target="_parent">Register</a> to view this area. {/if} </td> </tr> {else} <tr id="$[board.content_id]" class="$[board.content_class]"> <td class="icon">$[board.icon]</td> <td class="main clickable redirect last" colspan="4"> <span class="link">$[board]</span><br /> <p class="description">$[board.description]</p> </td> </tr> {/if} {/foreach} {if !$[board]} <tr class="last"><td class="last center" colspan="5">No boards were found.</td></tr> {/if} </tbody> </table> This is the betazone I have it in place: army83two.freemessageboards.com/
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Jan 22, 2013 5:33:20 GMT -8
Odd, because it works over on my test forum, even when using your entire template. I assume that's still up at the link you gave?
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Jan 22, 2013 5:59:58 GMT -8
It's still up and won't remove it until we figure out what's going on.
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Jan 22, 2013 6:11:06 GMT -8
Honestly not sure what to suggest - even using your copied template I can get it to work at pawltemp.freemessageboards.comHeading off to work shortly, but I'll come back tonight to take a look.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Jan 22, 2013 6:11:26 GMT -8
Sorry Paul as I had the wrong theme as default. Take a look now, as it is working just fine.
Thanks a bunch...
EDIT: oPPPS! Just noticed that it is indicated in all boards and several boards I have open to guests.
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Jan 22, 2013 6:22:58 GMT -8
Ahh, glad you worked that one out. =]
Is that not what the original code did? Not sure how I'd make it work around that, but like I said, I'll take a look later. =]
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Jan 22, 2013 7:05:14 GMT -8
The orginal code only showed for boards that were not viewable by guests.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Jan 27, 2013 6:00:16 GMT -8
Hello Paul...
Any update on the progress of getting this to work?
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Jan 27, 2013 8:25:50 GMT -8
I've yet to find a way to check if a user can access a board, so no progress yet. Might be better suited to a plugin if you want it to check automatically. You could do it with a HUGE number of if/else statements, but that would require manual updates as boards are added/changed, which obviously isn't ideal.
|
|