The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#6
|
||||
|
||||
![]()
I tried moving it to the php code, and I end up with the same result. It is either always true, or always false. I like ti better in the php, as you stated, so I will leave it this way, but still can't get it to work right.
I tried $prepared['userid'] and still the same. --------------- Added [DATE]1444607425[/DATE] at [TIME]1444607425[/TIME] --------------- here is the updated php code: Code:
if ($show['dso_slips_view']) { if (isset($vbulletin->GPC['tab'])) { $selected_tab = $vbulletin->GPC['tab']; } $blockinfo['title'] = "Timeslips"; $blockid = "dso_slips"; $taburl = $memberurl = fetch_seo_url('member', $prepared) . "&tab=dso_slips#dso_slips"; $templater = vB_Template::create('memberinfo_tab'); $templater->register('selected_tab', $selected_tab); $templater->register('relpath', $relpath); $templater->register('blockinfo', $blockinfo); $templater->register('blockid', $blockid); $templater->register('taburl', $taburl); $template_hook['profile_tabs_last'] .= $templater->render(); require_once('./includes/functions_dso_slips.php'); $slipsqueue = $db->query_read("SELECT ID,Car_ID,Date,Track,RT,Sixty,ThreeThirty,Eighth_ET,Eighth_MPH,Thousand,Fourth_ET,Fourth_MPH FROM ".TABLE_PREFIX."dso_slips WHERE Owner = ".$userinfo['userid']." ORDER BY Date DESC"); while ($row = $db->fetch_array($slipsqueue)) { if (isset($row['Eighth_ET']) AND isset($row['Eighth_MPH'])) { $row['Eighth_ET'] = number_format($row['Eighth_ET'],3,'.',',')." @ ".number_format($row['Eighth_MPH'],2,'.',',')." mph"; } if (isset($row['Fourth_ET']) AND isset($row['Fourth_MPH'])) { $row['Fourth_ET'] = number_format($row['Fourth_ET'],3,'.',',')." @ ".number_format($row['Fourth_MPH'],2,'.',',')." mph"; } if ($show['dso_slips_edit_own'] && $userinfo['userid'] == $prepared['userid']) { $dso_slip_edit_own_link = 'true'; } else { $dso_slip_edit_own_link = 'false'; } if ($show['dso_slips_delete_own'] && $userinfo['userid'] == $prepared['userid']) { $dso_slip_delete_own_link = 'true'; } else { $dso_slip_delete_own_link = 'false'; } $queue[] = array ( 'id' => $row['ID'], 'car_id' => $row['Car_ID'], 'car_name' => getVehicleName($row['Car_ID']), 'date' => date("M d, Y - g:i a ",strtotime($row['Date'])), 'track' => getTrackName($row['Track']), 'track_www' => getTrackWeb($row['Track']), 'rt' => number_format($row['RT'],3,'.',','), '60ft' => number_format($row['Sixty'],3,'.',','), '330ft' => number_format($row['ThreeThirty'],3,'.',','), '8et' => $row['Eighth_ET'], '1000ft' => number_format($row['Thousand'],3,'.',','), '4et' => $row['Fourth_ET'] ); } $templater = vB_Template::create('dso_slips_profile_tab'); $templater->register('dso_slip_edit_own_link', $dso_slip_edit_own_link); $templater->register('dso_slip_delete_own_link', $dso_slip_delete_own_link); $templater->register('selected_tab', $selected_tab); $templater->register('queue', $queue); $template_hook['profile_tabs'] .= $templater->render(); } Code:
if ($show['dso_slips_delete_own'] && $userinfo['userid'] == $prepared['userid']) { $dso_slip_delete_own_link = 'true'; } else { $dso_slip_delete_own_link = 'false'; } If I change it to bbuserinfo (instead of prepared) then it is always false (but should be true when viewing my profile) EDIT: Finally got it, thank you for the help. When I added vbulletin-> to userinfo and used prepared instead of bbuserinfo it works. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|