|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
<script language="Javascript" type="text/javascript" src="$vars_config{CGIURL}/ubb_status.cgi"></script> is the line causing the js error as for the repeating lines, you can set navbar_replace_right to equal the active topics link, then do a my $header = $hf->[0]; $header =~ s/$TBB/qq~THE CODE FOR THE TABLE~/eisg; and then replace $hf->[0] with $header. I believe once the javascript error is fixed, the avatar and user title will work too
|
|
|
|
Joined: May 2001
Posts: 684
Code Monkey
|
Code Monkey
Joined: May 2001
Posts: 684 |
Hi,
how can I get a European Time format and what about the Javacript error?
thx d-talk
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
this is of beta quality, I've got some other projects ahead of it, so it may be a while before it gets all the kinks worked out.
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
uh, https://www.ubbdev.com/test/ubbcgi/ubb_status.cgi is full of errors Copy this line to around the top: quote: use vars qw($allowmods $backwards $confdel $deletealt $delimage $filehandle $floodcheck $ftime $images $iptitle $am $pm $js $js2 $masterCharset $me $message $nomeend $page_background $password $pubname $reset $savename $send $shoutbox $shoutext $shoutmax $shouts $shoutsize $show_public_name $showtime $staff $styles $typemsg $typeshout $ubb_images $unreg $unregpost $user_number $user_topic_view $username $viewunreg %GotTime %in %template_html %template_match %vars_config %vars_misc %vars_style %vars_style_shoutbox %vars_wordlets %vars_wordlets_err @checkTheProfile @ubber %vars_time $datetitle %vars_version_information $version_number $release_j $version $trademark $trade $ULTIMATEBB %ULTIMATEBB $CONTROLPANEL %vars_display $InfopopCopyright $masterCharset %vars_wordlets_criterr %vars_search %vars_registration %vars_pm %vars_misc %vars_email %vars_pntf %vars_time %GENERIC_GLOBALS %vars_mods %vars_wordlets_err %vars_style %vars_forums %vars_wordlets $backend %GotTime @alltheforums %vars_cats @allthecategories $exact_path $ThisHTML $PNTF $vars_graemlins $frontend %template_html %vars_style_reference %template_match %ProfileNumber $memlistopen @benches %FILE_CACHE $forum_threads %forum_topics $alpha_threads %forum_thread_data %forum_recentmeta %todays_active_topics %member_profile %vars_wordlets_img $TBT $TBB);
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
thanks LK, that's some of the work it needs I'll add it and see where we're at then
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
Also add to the very beginning (perhaps after the line "small scripts by allen"?): use constant SEVENSEVENSEVEN => 0777; use constant SIXSIXSIX => 0666;
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
ok, added that and a few more it wanted and am now getting this: quote:
document.avatar.avvy.src = "https://ubbdev.com/test/ubb/unregistered.gif"; document.getElementById('status').appendChild(document.createTextNode('Administrator'));
printed out when accessing the file, which is where the javascript error is coming from I guess
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
For some reason, the line <script language="Javascript" type="text/javascript" src="$vars_config{CGIURL}/ubb_status.cgi"></script> is added to the top of forum_summary and not the bottom... Try to move it around till it's below the other part, that might fix it.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
that fixed the error and it now shows the status, For some reason I moved it up top during one of my bug-fix searches yesterday The avatar it is looking for, is that different from the 'your picture' that's found in the profile?
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
yes it is, it's the actual avatar under your name in boards where avatar is enabled... So at UBBDev it'd show the no-avatar image.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
thank you Zip file up top updated with bugfixes and latest code
|
|
|
|
Joined: May 2001
Posts: 684
Code Monkey
|
Code Monkey
Joined: May 2001
Posts: 684 |
Hi LK and Allen,
what can I do to get the european time format for the last-visited time?
thx d-talk
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
you can't do much, unless you change the session cookie behavior (really not recommended) or program something (should be pretty simple) in javascript which splits the date/time into arrays and rebuilds them as either european time format or yyyy,mm,dd,HH,mm,ss for the timestamp function.
|
|
|
|
Joined: May 2001
Posts: 684
Code Monkey
|
Code Monkey
Joined: May 2001
Posts: 684 |
Another question, how can I delete the membersline, i marked red at the picture... **** I can't programm somethin for european time-format...
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
there's gonna be bugs to be expected if you insist on using beta code We can't upgrade the mods fast enough for you as you're installing 4-5 at a time. If you want bug-free/less code, it's gonna be after 6.7 goes final
|
|
|
|
Joined: May 2001
Posts: 684
Code Monkey
|
Code Monkey
Joined: May 2001
Posts: 684 |
|
|
|
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
There are already lots of bugs being reported, check http://www.ubbcentral.com/ in the bugs section ...
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
Hey Allen, finally got around to installing this and I've only got one problem. I have some html in my custom title, and instead of formatting, it just prints out the html too, making it look quite weird.
Any suggestions?
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
oh, and Allen. I finally got it to work with the universal headers. my $hf = &generic_wrapper({ page_title => "", navbar_replace_right => qq~<font class="small"><b> » <a href="$ULTIMATEBB{"ubb=get_daily"}">$vars_wordlets{active_topics}</a> « </b></td></tr> <tr> <td colspan="2" bgcolor="$vars_style{TableColorStrip}"><img src="$vars_config{NonCGIURL}/spacer.gif" width="1" height="7" alt="BLAM!" /></td> </tr> <tr> <td width="50%" align="left" valign="top" class="descript-font" bgcolor="$vars_style{AltColumnColor1}"> <form id="avatar" name="avatar" action=""> <table align="left"><tr><td><img src="$vars_config{NonCGIURL}/unregistered.gif" alt=" - " id="avvy" name="avvy" /></td></tr></table></form><b> Your Info </b>
<script language="Javascript" type="text/javascript">document.writeln("You last visited: <b>", unescape(session_dt), "</b>");</script>
Your status is: <b><span id="status"></span></b> </td> <td width="50%" valign="top" align="left" class="descript-font" bgcolor="$vars_style{AltColumnColor1}"><font size="$vars_style{TextSize}" face="$vars_style{FontFace}"><b> Forum Info </b>
$memberline
Total Topics: $AllTopics Total Posts: $AllPosts </font> ~, just played around with the code. (PS. change class="small" to size="$vars_style{FDTextSize}"
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
grazi I'll update the instructions this evening
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
Allen, how would I go about removing the following code from user titles before it was outputted? where * are wildcards. I only know how to do if it there are no wildcards
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
? I gotta get things moved to this pc so I know what yer talkin about Gimme a day or so and I'll get it. What are you trying to achieve with the output?
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
ok, at my other boards (GR) we have stars denoting rank in the titles. Using this mod, the status prints out as html. ie. Special <img src="http://www.alforadmin.com/special.gif" alt="-" /> whereas in posts,etc it would show as Special
So is there anyway to remove <img src="http://www.alforadmin.com/special.gif" alt="-" />
so that it'll just show "Special"?
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
nm Allen, I added this and it worked. $user_status =~ s/(<img)(.+?)(>)//isg; $user_status =~ s/(<br)(.+?)(>)//isg;
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
unsupported update for those who want formatted dates, etc... change... <script language="Javascript" type="text/javascript">document.writeln("You last visited: <b>", unescape(session_dt), "</b>");</script>
to... <script language="Javascript" type="text/javascript"> <!-- var tippy = unescape(session_dt); var tippy_array = tippy.split("-"); var month = parseInt(tippy_array[0]) - 1; var day = parseInt(tippy_array[1]) + 0;
if(tippy_array[2] != null && tippy_array[2] != '') { var new_array_tippy = tippy_array[2].split(" "); var year = parseInt(new_array_tippy[0]);
var newer_array_tippy = new_array_tippy[1].split(':');
hour = parseFloat(newer_array_tippy[0]);
if(new_array_tippy[2] == 'PM'){ hour += 12; }
var minutes = parseInt(newer_array_tippy[1]);
document.write('You last visited: <b>'); document.write(timestamp(new Date(year,month,day,hour,minutes,0), dfrm, null, 0, 0, 0, 0), "</b>"); document.write(timestamp(new Date(year,month,day,hour,minutes,0), null, tfrm, 0, 0, 0, 0), ' ');
} //--> </script>
|
|
|
|
Joined: May 2001
Posts: 684
Code Monkey
|
Code Monkey
Joined: May 2001
Posts: 684 |
What have I to change, that i can delete the Welcomeheader....?
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
Allen, could you change $vars_config{NonCGIURL}/spacer.gif
to
$vars_config{NonCGIURL}/blank.gif?
Not doing so results in a large server error log with the files not found
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
Allen, in ubb status, could you change to if($avurl && $avok =~ /(0|2)/) { It's needed for those who use the Always allow, even if group can't setting for avatars for some users
|
|
|
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
Found by me getting annoyed lol...
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
k, I think I got all the bugfixes to date (didn't try the formatted date, since no-one reported it working )
|
|
|
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
It's funny, I've seen this running at Ian's site (I said Ian!) and i was wondering why HE didn't publish it, so I asked him... Response: "I'd release it but allen would be irate"... I'm all "why?" andhe's all "it's in one of the template forums"... So I'm just sitting here thinking to myself, it's technically a mod ...
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
??? What?
It's not my code or Ian's, it's bookie's with help from LK, I believe...
So I'm just sitting here thinking to myself, why does it matter who publishes it here? :rolleyes:
|
|
|
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
Nonono, the matter was, I had no clue where it was as it wasn't in the 6.x forum lol
|
|
|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
Originally posted by Ian Spence: unsupported update for those who want formatted dates, etc... change... <script language="Javascript" type="text/javascript">document.writeln("You last visited: <b>", unescape(session_dt), "</b>");</script>
to... <script language="Javascript" type="text/javascript"> <!-- var tippy = unescape(session_dt); var tippy_array = tippy.split("-"); var month = parseInt(tippy_array[0]) - 1; var day = parseInt(tippy_array[1]) + 0;
if(tippy_array[2] != null && tippy_array[2] != '') { var new_array_tippy = tippy_array[2].split(" "); var year = parseInt(new_array_tippy[0]);
var newer_array_tippy = new_array_tippy[1].split(':');
hour = parseFloat(newer_array_tippy[0]);
if(new_array_tippy[2] == 'PM'){ hour += 12; }
var minutes = parseInt(newer_array_tippy[1]);
document.write('You last visited: <b>'); document.write(timestamp(new Date(year,month,day,hour,minutes,0), dfrm, null, 0, 0, 0, 0), "</b>"); document.write(timestamp(new Date(year,month,day,hour,minutes,0), null, tfrm, 0, 0, 0, 0), ' ');
} //--> </script> IanIf I dont have the timestamp function in my source code, is there still a way I can switch 5-23-2004 to say May 23 2004? Cuz this code isnt working for me, for obvious reasons. Wondering if theres a way around it or not...
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
there should be a way around it if you just take the code from datelib.js (steal the one from here)
|
|
|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
Hmmm ok I got it, just gotta work with it and figure it out now. thanks
|
|
|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
hmmm, not working with this code: <script src="datelib.js" language="Javascript1.3" type="text/javascript"></script> <script language="Javascript" type="text/javascript"> <!--
var tippy = unescape(session_dt); var tippy_array = tippy.split("-"); var month = parseInt(tippy_array[0]) - 1; var day = parseInt(tippy_array[1]) + 0;
if(tippy_array[2] != null && tippy_array[2] != '') { var new_array_tippy = tippy_array[2].split(" "); var year = parseInt(new_array_tippy[0]);
var newer_array_tippy = new_array_tippy[1].split(':');
hour = parseFloat(newer_array_tippy[0]);
if(new_array_tippy[2] == 'PM'){ hour += 12; }
var minutes = parseInt(newer_array_tippy[1]);
document.write(timestamp(new Date(year,month,day,hour,minutes,0), dfrm, null, 0, 0, 0, 0)); document.write(timestamp(new Date(year,month,day,hour,minutes,0), null, tfrm, 0, 0, 0, 0));
}
//--> </script>
|
|
|
|
Joined: Jan 2003
Posts: 118
Member
|
Member
Joined: Jan 2003
Posts: 118 |
OK, this looked really cool so I tried to install it and I get these errors... syntax error at NonCGIPath/Templates/public_forum_summary.pl line 292, near "«" BEGIN not safe after errors--compilation aborted at NonCGIPath/Templates/public_forum_summary.pl line 293. Tue May 25 19:42:12 2004] cgiultimatebb.cgi: Number found where operator expected at /noncgi/Templates/public_forum_summary.pl line 292, near "«" [Tue May 25 19:42:12 2004] cgiultimatebb.cgi: (Missing operator before 171?) I checked and double checked and it looks like I hacked the files OK...
-GATOR
"Pain is temporary, Pride is forever"
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
Try this for the first step... (first, undo your first step.) ************************** * Open public_forum_summary.pl **************************
FIND: =====
page_title => "", before_navbar => qq~</font></td><td align="right"> <font size="$vars_style{FDTextSize}" face="$vars_style{FontFace}"><b> » <a href="$ULTIMATEBB{"ubb=get_daily"}">$vars_wordlets{active_topics}</a> « </b>~, navbar_replace_right => qq~<b>$memberline</b>~,
Replace with: =====
page_title => "", navbar_replace_right => qq~<font size="$vars_style{FDTextSize}"><b> » <a href="$ULTIMATEBB{"ubb=get_daily"}">$vars_wordlets{active_topics}</a> « </b></td></tr> <tr> <td colspan="2" bgcolor="$vars_style{TableColorStrip}"><img src="$vars_config{NonCGIURL}/blank.gif" width="1" height="7" alt="BLAM!" /></td> </tr> <tr> <td width="50%" align="left" valign="top" class="descript-font" bgcolor="$vars_style{AltColumnColor1}"> <form id="avatar" name="avatar" action=""> <table align="left"><tr><td><img src="$vars_config{NonCGIURL}/unregistered.gif" alt=" - " id="avvy" name="avvy" /></td></tr></table></form><b> Your Info </b>
<script language="Javascript" type="text/javascript">document.writeln("You last visited: <b>", unescape(session_dt), "</b>");</script>
Your status is: <b><span id="status"></span></b> </td> <td width="50%" valign="top" align="left" class="descript-font" bgcolor="$vars_style{AltColumnColor1}"><font size="$vars_style{TextSize}" face="$vars_style{FontFace}"><b> Forum Info </b>
$memberline
Total Topics: $AllTopics Total Posts: $AllPosts </font> ~,
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 87
Joined: December 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|