PDA

View Full Version : Anyone tried UltraBoard yet ?


SneakyDave
04-27-1999, 02:17 PM
Holy fat wallet Batman, I'll have to try it out.

Justin
04-27-1999, 02:23 PM
I can't figure out where the problem is there... not sure what you are wanting to do here - did adding the <font color=#FF0000>red</font> code cause errors? I doubt it... or do you want to add the second snippet to print in the first section? Elaborate a little and I'll try to figure it out...

As for the ~, whey you say print qq, whatever follows is the quoting character (don't remember what it's really called :)). Instead of using quotes, it uses whatever follows the qq. If you use anything like ({[ then the closing one has to be the opposite )}]. But if you use ~ or one of the other acceptable characters (don't remember them all) you just close it with that character.

So:

print qq~
This is my text!!!
~;

is the same as:

print qq(
This is my text!!!
);

or:

print &quot;\nThis is my text!!!\n&quot;;

The main difference being that you don't have to escape the quotes in your HTML you are printing. You could also say:

print <<HTML;
This is my text!!!
HTML

Either way. That's one of the things I like about Perl - anything you want to do there's usually 25 ways to do it, all with their own advantages / disadvantages:D

------------------
Justin Nelson
FutureQuest Support

Dean B
04-27-1999, 02:53 PM
Justin,
The highlighted text was only to show you the relevant line here (just thought i'd use your snazzy new feature, that was all ;)) It's not in the actual file.

Basically, all I want to do is substitute this -
<td><font face=&quot;$FontFace&quot; size=&quot;$MenuTextSize&quot; color=&quot;$MenuTextColor&quot;>GMT $GMTOffSet</font></td>

and put this in its place -
print qq~<tr bgcolor=&quot;$RowColor&quot;><td colspan=&quot;2&quot;><font face=&quot;$FontFace&quot; size=&quot;$TextSize&quot; color=&quot;$TextColor&quot;>$MainMenuText14 : $DATA{'_TOTAL'}</font></td></tr>\n~;

I have to put the dbmopen and dbmclose close lines in for this to function correctly ?[nbsp][nbsp]Do I need to put the ; on the end of the new line ?[nbsp][nbsp]And should I put the \n if this is the left cell of a row that has another cell beside it ?
Take a look at the UltraBoard on the very bottom and you''ll see what I mean.

Dean.

Justin
04-27-1999, 03:02 PM
I know that the text isn't red in the actual file lol - that would be a little hard to explain if it was :)

Ok, I'll use another of my nifty new features now:)

sub PrintVersion {
local ($PrintTime) = @_[0];
if ($PrintTime eq &quot;YES&quot;) {
<font color=#FF0000>dbmopen(%DATA, &quot;$DBPath/users&quot;, 0666) || die &quot;Couldn't open the file ($DBPath/users)&quot;;</font>
print qq~
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<font color=#FF0000><td colspan=&quot;2&quot;><font face=&quot;$FontFace&quot; size=&quot;$TextSize&quot; color=&quot;$TextColor&quot;>$MainMenuText14 : $DATA{'_TOTAL'}</font></td></font>
<td align=&quot;right&quot;><font face=&quot;$FontFace&quot; size=&quot;$MenuTextSize&quot; color=&quot;$MenuTextColor&quot;>Powered by <A HREF=&quot;http://www.ultrascripts.com/UltraBoard/&quot;>UltraBoard v1.50b</A></font></td>
</tr>
</table>
~;
<font color=#FF0000>dbmclose(%DATA);</font>
}else{
print qq~
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td align=&quot;right&quot;><font face=&quot;$FontFace&quot; size=&quot;$MenuTextSize&quot; color=&quot;$MenuTextColor&quot;>Powered by <A HREF=&quot;http://www.ultrascripts.com/UltraBoard/&quot;>UltraBoard v1.50b</A></font></td>
</tr>
</table>
~;
}
}


Just substitute your red code with the red code above and it should work ;)

------------------
Justin Nelson
FutureQuest Support<!-- NO_AUTO_LINK -->
[This message has been edited by Justin (edited 04-27-99)]

Dean B
04-27-1999, 03:32 PM
Justin,
I hate you ;)[nbsp][nbsp]That must have been one of the only #@$%&amp;*£! permutations I didn't try ...

Thx bud :)[nbsp][nbsp]Go set one up Justin, I think the cookie function isn't quite right.

Dean.
ps.[nbsp][nbsp]Like the new format of the UBB email notification but I'm not sure if I like the content of the new reply being added in the email as well.

Bi4Be
04-27-1999, 07:42 PM
Oh.... my....

That was one good free script. I am still in shock. Unbeleivable, nothing I would have expected to be free.

Thanks Dean,
-Bi4Be

hearts
04-27-1999, 11:05 PM
hey Dean.. that is a very appealing bulltetin board! :)

Dean B
04-28-1999, 01:17 AM
Hi guys n' gals,

Just wondering if anyone else has played with the UltraBoard scripts.[nbsp][nbsp]It has a stack of features and seems an awful lot faster than the UBB.[nbsp][nbsp]I've been messing around with mine today (I corrected all the grammatical errors &amp; spelling in the .lang file, loads of em ;))[nbsp][nbsp]I'm now trying to be clever, so far without success, in replacing a couple of lines of code that will display total board users instead of GMT offset but keep getting syntax errors.[nbsp][nbsp]I'm guessing it's just a case of placing the relevant lines in the right place.[nbsp][nbsp]Variations I've tried so far cause my script error log to increase greatly in size :)

Oky doky, the sub routine line I'm trying to change is in the UltraBoard.lib shown highlighted.

sub PrintVersion {
local ($PrintTime) = @_[0];
if ($PrintTime eq &quot;YES&quot;) {
print qq~
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<font color=#FF0000><td><font face=&quot;$FontFace&quot; size=&quot;$MenuTextSize&quot; color=&quot;$MenuTextColor&quot;>GMT $GMTOffSet</font></td></font>
<td align=&quot;right&quot;><font face=&quot;$FontFace&quot; size=&quot;$MenuTextSize&quot; color=&quot;$MenuTextColor&quot;>Powered by <A HREF=&quot;http://www.ultrascripts.com/UltraBoard/&quot;>UltraBoard v1.50b</A></font></td>
</tr>
</table>
~;
}else{
print qq~
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td align=&quot;right&quot;><font face=&quot;$FontFace&quot; size=&quot;$MenuTextSize&quot; color=&quot;$MenuTextColor&quot;>Powered by <A HREF=&quot;http://www.ultrascripts.com/UltraBoard/&quot;>UltraBoard v1.50b</A></font></td>
</tr>
</table>
~;
}
}

The lines I believe I need to insert are in the UBAdmin.cgi and are -

dbmopen(%DATA, &quot;$DBPath/users&quot;, 0666) || die &quot;Couldn't open the file ($DBPath/users)&quot;;
print qq~<tr bgcolor=&quot;$RowColor&quot;><td colspan=&quot;2&quot;><font face=&quot;$FontFace&quot; size=&quot;$TextSize&quot; color=&quot;$TextColor&quot;>$MainMenuText14 : $DATA{'_TOTAL'}</font></td></tr>\n~;
dbmclose(%DATA);

I can see these lines open the DB, print $DATA{'_TOTAL'} then close the DB.[nbsp][nbsp]I don't understand what the ~ does though.[nbsp][nbsp]Anybody help me out here and want to post a revised Sub PrintVersion ?

BTW, if you want to take a look and have a play it's at -
http://www.dmcity.com/cgi-bin/UltraBoard/UltraBoard.cgi

Dean.
--- Living on a knife edge and constantly looking for a band aid ---<!-- NO_AUTO_LINK -->
[This message has been edited by Dean B (edited 04-27-99)]

SneakyDave
04-28-1999, 01:27 AM
Hey, that's looks good, does it use MySQL? What's the cost?

Dean B
04-28-1999, 01:36 AM
Nope :)[nbsp][nbsp]No mySQL and it's free !