Mythotical |
02-12-2006 03:52 AM |
Morgan, here is the funny thing, all permissions are set to viewable defaults, anyone can view files, etc.
Its odd, I know that is has nothing to do with the template so maybe its the code. I will have it posted below that way you can check to make sure I didn't accidentally change anything.
PhotoPlog Member Info:
Code:
// photoplog_memberinfo
$photoplog_location = eregi_replace("[/]$","",$vbulletin->options['homeurl']).$vbulletin->options['photoplog_script_dir'];
$photoplog_file_infos = $db->query_read("SELECT * FROM photoplog_fileuploads WHERE userid = ".intval($userinfo['userid'])." ORDER BY RAND() LIMIT 5");
$photoplog_cnt_bits = 0;
$photoplog_row_table = '';
while ($photoplog_file_info = $db->fetch_array($photoplog_file_infos))
{
$photoplog_cnt_bits++;
$photoplog_fileid = $photoplog_file_info['fileid'];
$photoplog_row_table .= "
<td class=\"alt2\" align=\"center\" width=\"20%\"><a href=\"".$photoplog_location."/index.php?".$vbulletin->session->vars['sessionurl']."n=".$photoplog_fileid."\">
<img src=\"".$photoplog_location."/file.php?".$vbulletin->session->vars['sessionurl']."n=".$photoplog_fileid."&w=s\" border=\"0\" /></a>
</td>
";
}
$db->free_result($photoplog_file_infos);
$photoplog_table_start = "<table class=\"tborder\" border=\"0\" cellpadding=\"".$stylevar['cellpadding']."\" cellspacing=\"".$stylevar['cellspacing']."\" align=\"center\" width=\"100%\"><tr>
<td colspan=\"5\" class=\"thead\"><a style=\"float: ".$stylevar['right'].";\" href=\"#top\" onclick=\"return toggle_collapse('photoplog_memberinfo')\"><img id=\"collapseimg_photoplog_memberinfo\" src=\"".$stylevar['imgdir_button']."/collapse_thead".$vbcollapse['collapseimg_photoplog_memberinfo'].".gif\" alt=\"\" border=\"0\" /></a></td>
</tr><tbody id=\"collapseobj_photoplog_memberinfo\" style=\"".$vbcollapse['collapseobj_photoplog_memberinfo']."\"><tr>";
$photoplog_table_end = "</tr></tbody></table><br />";
$photoplog_memberinfo = $photoplog_table_start.$photoplog_row_table.$photoplog_table_end;
if (!$photoplog_cnt_bits)
{
$photoplog_memberinfo = '';
}
// photoplog_memberinfo
PhotoPlog Member Info Thumbs:
Code:
// PhotoPlog
// edit the MEMBERINFO template, placing $photoplog_memberinfo
// right after $navbar appears in the template and save
$photoplog_cnt_bits = 0;
if ($permissions['photoplogpermissions'] & $vbulletin->bf_ugp_photoplogpermissions['photoplogcanviewfiles'])
{
$photoplog_homeurl = parse_url($vbulletin->options['homeurl']);
$photoplog_schemehost = $photoplog_homeurl['scheme'].'://'.$photoplog_homeurl['host'];
$photoplog_location = $photoplog_schemehost.$vbulletin->options['photoplog_script_dir'];
$photoplog_file_infos = $db->query_read("SELECT *
FROM photoplog_fileuploads
WHERE userid = ".intval($userinfo['userid'])."
AND moderate = 0
ORDER BY RAND()
LIMIT 5
");
$photoplog_row_table = '';
while ($photoplog_file_info = $db->fetch_array($photoplog_file_infos))
{
$photoplog_cnt_bits++;
$photoplog_fileid = $photoplog_file_info['fileid'];
$photoplog_row_table .= "
<td class=\"alt2\" align=\"center\" width=\"20%\">
<a href=\"".$photoplog_location."/index.php?".$vbulletin->session->vars['sessionurl']."n=".$photoplog_fileid."\">
<img src=\"".$photoplog_location."/file.php?".$vbulletin->session->vars['sessionurl']."n=".$photoplog_fileid."&w=s\" border=\"0\" />
</a>
</td>
";
}
$db->free_result($photoplog_file_infos);
$photoplog_table_start = "<table class=\"tborder\" border=\"0\" cellpadding=\"".$stylevar['cellpadding']."\" cellspacing=\"".$stylevar['cellspacing']."\" align=\"center\" width=\"100%\"><tr>
<td colspan=\"5\" class=\"thead\"><a style=\"float: ".$stylevar['right'].";\" href=\"#top\" onclick=\"return toggle_collapse('photoplog_memberinfo')\"><img id=\"collapseimg_photoplog_memberinfo\" src=\"".$stylevar['imgdir_button']."/collapse_thead".$vbcollapse['collapseimg_photoplog_memberinfo'].".gif\" alt=\"\" border=\"0\" /></a>".$vbphrase['photoplog_random_thumbs']."</td>
</tr><tbody id=\"collapseobj_photoplog_memberinfo\" style=\"".$vbcollapse['collapseobj_photoplog_memberinfo']."\"><tr>";
$photoplog_table_end = "</tr></tbody></table><br />";
$photoplog_memberinfo = $photoplog_table_start.$photoplog_row_table.$photoplog_table_end;
}
if (!$photoplog_cnt_bits)
{
$photoplog_memberinfo = '';
}
// PhotoPlog
I don't think anything is changed but I could have added something on accident or the site owners partner could have changed something.
Also, could I change this line:
PHP Code:
$photoplog_file_infos = $db->query_read("SELECT * FROM photoplog_fileuploads WHERE userid = ".intval($userinfo['userid'])." AND moderate = 0 ORDER BY RAND() LIMIT 5
To:
PHP Code:
$photoplog_file_infos = $db->query_read("SELECT * FROM photoplog_fileuploads WHERE userid = ".intval($userinfo['userid'])." AND moderate = 0 ORDER BY ASC() LIMIT 5
That way it will get the last 5 and sort them ascending?
Cheers and thanks for the help
Steve
|