php forum
php mysql forum
php mysql smarty
 
Page 1 of 3 1 2 3 >
Topic Options
#115694 - 12/29/03 02:57 AM Fsum Status
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25366
Loc: Texas
Description: Adds your avatar and forum stats to the top of your fsum

Requirements: UBB 6.7

Demo: http://www.ubbdev.com/test/ubb/ultimatebb.php

Download: http://www.ubbdev.com/ubb/upload/00000494/fsum_status.zip

Notes: This is of alpha/beta quality.

Known Issues: I am getting a repeating of the top table due to it breaking the generic wrapper. Javascript error and other bugfixes done with LK's help smile
_________________________
- Allen wavey
- What Drives You?

Top
#115695 - 12/29/03 03:58 AM Re: Fsum Status
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
Code:
<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

Code:
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
_________________________
Code monkey like Fritos

Top
#115696 - 12/30/03 05:00 AM Re: Fsum Status
d-talk Offline
Code Monkey

Registered: 05/01/01
Posts: 685
Hi,

how can I get a European Time format and what about the Javacript error?

thx
d-talk
_________________________
Webmaster of d-talk & Kabel-Forum.com

Top
#115697 - 12/30/03 12:09 PM Re: Fsum Status
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25366
Loc: Texas
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.
_________________________
- Allen wavey
- What Drives You?

Top
#115698 - 12/30/03 12:31 PM Re: Fsum Status
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
uh, http://www.ubbdev.com/test/ubbcgi/ubb_status.cgi is full of errors tipsy

Copy this line to around the top:
Quote:
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);
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#115699 - 12/30/03 12:39 PM Re: Fsum Status
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25366
Loc: Texas
thanks LK, that's some of the work it needs laugh

I'll add it and see where we're at then smile
_________________________
- Allen wavey
- What Drives You?

Top
#115700 - 12/30/03 12:47 PM Re: Fsum Status
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Also add to the very beginning (perhaps after the line "small scripts by allen"?):
Code:
use constant SEVENSEVENSEVEN => 0777;
use constant SIXSIXSIX => 0666;
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#115701 - 12/30/03 12:49 PM Re: Fsum Status
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25366
Loc: Texas
ok, added that and a few more it wanted and am now getting this:

Quote:
quote:

document.avatar.avvy.src = "http://www.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 smile
_________________________
- Allen wavey
- What Drives You?

Top
#115702 - 12/30/03 01:03 PM Re: Fsum Status
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
For some reason, the line
Code:
<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.
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#115703 - 12/30/03 01:17 PM Re: Fsum Status
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25366
Loc: Texas
that fixed the error and it now shows the status, thumbsup For some reason I moved it up top during one of my bug-fix searches yesterday tipsy


The avatar it is looking for, is that different from the 'your picture' that's found in the profile?
_________________________
- Allen wavey
- What Drives You?

Top
#115704 - 12/30/03 01:21 PM Re: Fsum Status
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
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.
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#115705 - 12/30/03 01:27 PM Re: Fsum Status
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25366
Loc: Texas
thank you smile

Zip file up top updated with bugfixes and latest code smile
_________________________
- Allen wavey
- What Drives You?

Top
#115706 - 12/30/03 01:47 PM Re: Fsum Status
d-talk Offline
Code Monkey

Registered: 05/01/01
Posts: 685
Hi LK and Allen,

what can I do to get the european time format for the last-visited time?

thx
d-talk
_________________________
Webmaster of d-talk & Kabel-Forum.com

Top
#115707 - 12/30/03 01:58 PM Re: Fsum Status
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
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.
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#115708 - 12/30/03 02:04 PM Re: Fsum Status
d-talk Offline
Code Monkey

Registered: 05/01/01
Posts: 685
Another question,

how can I delete the membersline, i marked red at the picture...



**** I can't programm somethin for european time-format... frown frown frown
_________________________
Webmaster of d-talk & Kabel-Forum.com

Top
#115709 - 12/30/03 02:27 PM Re: Fsum Status
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25366
Loc: Texas
there's gonna be bugs to be expected if you insist on using beta code tipsy 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 smile
_________________________
- Allen wavey
- What Drives You?

Top
#115710 - 12/30/03 02:39 PM Re: Fsum Status
d-talk Offline
Code Monkey

Registered: 05/01/01
Posts: 685
laugh
_________________________
Webmaster of d-talk & Kabel-Forum.com

Top
#115711 - 12/30/03 06:27 PM Re: Fsum Status
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5092
Loc: Portland, OR, USA
There are already lots of bugs being reported, check http://www.ubbcentral.com/ in the bugs section wink ...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#115712 - 01/07/04 05:45 PM Re: Fsum Status
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
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?
_________________________
Code monkey like Fritos

Top
#115713 - 01/07/04 05:56 PM Re: Fsum Status
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
oh, and Allen. I finally got it to work with the universal headers.

Code:
	my $hf = &generic_wrapper({
		page_title => "",
		navbar_replace_right => qq~<font class="small"><b>
&#187; <a href="$ULTIMATEBB{"ubb=get_daily"}">$vars_wordlets{active_topics}</a>
&#171;
</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 &nbsp;&nbsp; Total Posts: $AllPosts
</font>
~,
just played around with the code. (PS. change class="small" to size="$vars_style{FDTextSize}"
_________________________
Code monkey like Fritos

Top
#115714 - 01/08/04 12:50 PM Re: Fsum Status
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25366
Loc: Texas
grazi thumbsup

I'll update the instructions this evening smile
_________________________
- Allen wavey
- What Drives You?

Top
#115715 - 01/22/04 04:23 PM Re: Fsum Status
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
Allen, how would I go about removing the following code from user titles before it was outputted?

Code:
<img src="*" alt="*" >
where * are wildcards. I only know how to do if it there are no wildcards
_________________________
Code monkey like Fritos

Top
#115716 - 01/25/04 06:12 PM Re: Fsum Status
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25366
Loc: Texas
?

I gotta get things moved to this pc so I know what yer talkin about tipsy Gimme a day or so and I'll get it.

What are you trying to achieve with the output?
_________________________
- Allen wavey
- What Drives You?

Top
#115717 - 01/25/04 06:34 PM Re: Fsum Status
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
ok, at my other boards (GR) we have stars denoting rank in the titles.

Using this mod, the status prints out as html.
ie.
Code:
Special
<img src="http://www.alforadmin.com/special.gif" alt="-" />
whereas in posts,etc it would show as

Special
<stars>

So is there anyway to remove
Code:
<img src="http://www.alforadmin.com/special.gif" alt="-" />
so that it'll just show "Special"?
_________________________
Code monkey like Fritos

Top
#115718 - 01/26/04 10:28 PM Re: Fsum Status
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
nm Allen, I added this and it worked.
Code:
$user_status =~ s/(<img)(.+?)(>)//isg;
$user_status =~ s/(<br)(.+?)(>)//isg;
_________________________
Code monkey like Fritos

Top
#115719 - 02/06/04 05:31 PM Re: Fsum Status
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
unsupported update for those who want formatted dates, etc...

change...

Code:
<script language="Javascript" type="text/javascript">document.writeln("You last visited: <b>", unescape(session_dt), "</b>");</script>

to...

Code:
<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>
_________________________
Code monkey like Fritos

Top
#115720 - 02/08/04 12:23 PM Re: Fsum Status
d-talk Offline
Code Monkey

Registered: 05/01/01
Posts: 685
What have I to change, that i can delete the Welcomeheader....?

_________________________
Webmaster of d-talk & Kabel-Forum.com

Top
#115721 - 02/29/04 11:44 AM Re: Fsum Status
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
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
_________________________
Code monkey like Fritos

Top
#115722 - 04/08/04 07:50 PM Re: Fsum Status
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
Allen, in ubb status, could you change

Code:
	if($avurl && !$avok) {
to

Code:
	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
_________________________
Code monkey like Fritos

Top
#115723 - 04/08/04 08:11 PM Re: Fsum Status
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5092
Loc: Portland, OR, USA
Found by me getting annoyed lol...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#115724 - 04/09/04 12:50 AM Re: Fsum Status
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25366
Loc: Texas
k, I think I got all the bugfixes to date (didn't try the formatted date, since no-one reported it working tipsy )
_________________________
- Allen wavey
- What Drives You?

Top
#115725 - 04/09/04 01:09 PM Re: Fsum Status
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5092
Loc: Portland, OR, USA
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 frown ...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#115726 - 04/09/04 02:36 PM Re: Fsum Status
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25366
Loc: Texas
??? 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:
_________________________
- Allen wavey
- What Drives You?

Top
#115727 - 04/09/04 02:39 PM Re: Fsum Status
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5092
Loc: Portland, OR, USA
Nonono, the matter was, I had no clue where it was as it wasn't in the 6.x forum lol
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#115728 - 05/24/04 01:55 AM Re: Fsum Status
havoq Offline
Member

Registered: 09/11/01
Posts: 667
Loc: MI
Quote:
Originally posted by Ian Spence:

unsupported update for those who want formatted dates, etc...

change...

Code:
<script language="Javascript" type="text/javascript">document.writeln("You last visited: <b>", unescape(session_dt), "</b>");</script>

to...

Code:
<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>


Ian

If 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... wink
_________________________
-Jon
I have a measly [img]http://www.ubbdev.com/ud/?u=chugger93&s=1[/img] points, it's weak, I know wink
Where I continue to hack, even though it's a state of mind

Top
#115729 - 05/24/04 06:50 AM Re: Fsum Status
Ian Spence Offline
Master Hacker

Registered: 01/25/03
Posts: 3765
Loc: Saint Johns, PA
there should be a way around it if you just take the code from datelib.js (steal the one from here)
_________________________
Code monkey like Fritos

Top
#115730 - 05/24/04 11:21 AM Re: Fsum Status
havoq Offline
Member

Registered: 09/11/01
Posts: 667
Loc: MI
Hmmm ok I got it, just gotta work with it and figure it out now. thanks
_________________________
-Jon
I have a measly [img]http://www.ubbdev.com/ud/?u=chugger93&s=1[/img] points, it's weak, I know wink
Where I continue to hack, even though it's a state of mind

Top
#115731 - 05/24/04 12:05 PM Re: Fsum Status
havoq Offline
Member

Registered: 09/11/01
Posts: 667
Loc: MI
hmmm, not working with this code:

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(new