When you have a problem regarding this Yabbs module, you can maybe better ask Tywick
Aloha
by CBlue on 2003/11/14 17:57:13
I recommendhttp://www.onsmart.net I have been using them for several months now. They are very quick to answer questions and help you.
Weblog before 1.30
modules\weblog\blocks\weblog_recent.php
Line 133
$title = substr($myts->makeTboxData4Show($myrow['title']), 0, ($max_size -1))."...";
Changes to weblog 1.30
Modules/weblog/index.php
line 102
$myts =& MyTextSanitizer::getInstance();//HHTS
$category['cat_title'] = $myts->makeTboxData4Show($cat->getVar('cat_title','s'));//HHTS
line 115
$myts =& MyTextSanitizer::getInstance();//HHTS
$chtitle = $subarr[$i]->$myts->makeTboxData4Show(getVar('cat_title', 's'));//HHTS
$myts =& MyTextSanitizer::getInstance();//HHTS
$subcats .= sprintf(', <a href=\'%s/modules/%s/index.php?user_id=%d&cat_id=%d\'>%s</a>',
XOOPS_URL, $xoopsModule->dirname(), $user_id,
$subarr[$i]->$myts->makeTboxData4Show(getVar('cat_id'), $chtitle));//HHTS
}
line 181
$myts =& MyTextSanitizer::getInstance();//HHTS
$entry['title'] = $myts->makeTboxData4Show($entryObject->getVar('title'));
modules/weblog/details.php
line 96
$myts =& MyTextSanitizer::getInstance();//HHTS
$xoopsTpl->assign('title', $myts->makeTboxData4Show($entryObject->getVar('title')));//HHTS
soren at byu dot edu
14-Mar-2003 07:23
Let's say that you want to generate a MySQL password hash from a plain text password. Normally, you would just submit the MySQL query "SELECT PASSWORD('password')", but if for some reason you can't access to MySQL database directly, then you can use the following function (translated right out of the MySQL source code):
function mysql_password($passStr) {
$nr=0x50305735;
$nr2=0x12345671;
$add=7;
$charArr = preg_split("//", $passStr);
foreach ($charArr as $char) {
if (($char == '') || ($char == ' ') || ($char == '\t')) continue;
$charVal = ord($char);
$nr ^= ((($nr & 63) + $add) * $charVal) + ($nr << 8);
$nr2 += ($nr2 << 8) ^ $nr;
$add += $charVal;
}
return sprintf("%08x%08x", ($nr & 0x7fffffff), ($nr2 & 0x7fffffff));
}
example:
<? print mysql_password("hello"); ?>
outputs:
70de51425df9d787
Which is the same result you get if you do "SELECT PASSWORD('hello')" directly in MySQL. Hopefully you'll never be in a situation where you have to use this, but if you need it (like I did), it's here.
<?php
/* Connecting, selecting database */
$link = mysql_connect("mysql_host", "mysql_user", "mysql_password")
or die("Could not connect : " . mysql_error());
print "Connected successfully";
mysql_select_db("my_database") or die("Could not select database");