Topic: profile hooks not run in certain cases
in the public display part of the profile some hooks can't be run in some cases
if you see:
- line 1401 opens an if
- line1411 closes the same if
the hook at line 1410 which belongs to the code after line 1411 will only be run if the above mentioned if returns true
the endif and the hook call needs to be swapped, so the hook will always be called.
1401<?php if (!empty($forum_page['user_contact'])): ?>
1402 <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>">
1403 <div class="ct-box data-box">
1404 <h3 class="ct-legend hn"><span><?php echo $lang_profile['Contact info'] ?></span></h3>
1405 <ul class="data-list">
1406 <?php echo implode("\n\t\t\t\t\t\t", $forum_page['user_contact'])."\n" ?>
1407 </ul>
1408 </div>
1409 </div>
1410 <?php ($hook = get_hook('pf_view_details_pre_user_activity_info')) ? eval($hook) : null; ?>
1411 <?php endif; if (!empty($forum_page['user_activity'])): ?>
1412 <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>">
1413 <div class="ct-box data-box">
1414 <h3 class="ct-legend hn"><span><?php echo $lang_profile['Posts and topics'] ?></span></h3>
1415 <ul class="data-box">
1416 <?php echo implode("\n\t\t\t\t\t\t", $forum_page['user_activity']) ?>
1417 </ul>
1418 </div>
1419 </div>
1420 <?php ($hook = get_hook('pf_view_details_pre_user_sig_info')) ? eval($hook) : null; ?>
1421 <?php endif; if (isset($forum_page['sig_demo'])): ?>
1422 <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>">
1423 <div class="ct-box data-box">
1424 <h3 class="ct-legend hn"><span><?php echo $lang_profile['Current signature'] ?></span></h3>
1425 <div class="sig-demo"><?php echo $forum_page['sig_demo']."\n" ?></div>
1426 </div>
1427 </div>
1428 <?php endif; ?>
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.