2017-02-21, 03:29 AM
Is it possible to add a profile field to the page manager plugin and make it show? Right now I'm using the code SvePu gave:
It would have their name in the userlist and then right behind their name would be the profile field for sex for example.
I've tried looking around for the code to pull a profile field but all of them seem so complicated I'm not sure if I'm looking at the right thing.
If you know the answer can you explain it as well as give the coding so I can learn?
Thanks in advance!!
(2017-02-08, 06:33 PM)SvePu Wrote: Import the xml file with PageManager plugin and you'll see the clear code.....exported page XMLs are encoded.I was wondering if I could pull a profile field from the database and display what they have in that profile field?
But here also is the script for the PM page (without using MyBB Templates):
<?php global $headerinclude, $header, $theme, $footer, $db; $altbg = alt_trow(); $userlist = ''; $query = $db->simple_select("users", "*", "usergroup IN ('2','4')", array("order_by" => 'username', "order_dir" => 'ASC')); while($users = $db->fetch_array($query)) { $username = build_profile_link(format_name(htmlspecialchars_uni($users['username']), $users['usergroup'], $users['displaygroup']), $users['uid']); $userlist .= '<tr><td class="'.$altbg.'">'.$username.'</td></tr>'; $altbg = alt_trow(); } $template='<html> <head> <title>'.$pages['name'].'</title> {$headerinclude} </head> <body> {$header} <table border="0" cellspacing="'.$theme['borderwidth'].'" cellpadding="'.$theme['tablespace'].'" class="tborder"> <thead> <tr> <td class="thead"> <strong>'.$pages['name'].'</strong> </td> </tr> </thead> <tbody> {$userlist} </tbody> </table> <br /> {$footer} </body> </html>'; $template=str_replace("\'", "'", addslashes($template)); add_breadcrumb($pages['name']); eval("\$page=\"".$template."\";"); output_page($page); ?>
It would have their name in the userlist and then right behind their name would be the profile field for sex for example.
I've tried looking around for the code to pull a profile field but all of them seem so complicated I'm not sure if I'm looking at the right thing.
If you know the answer can you explain it as well as give the coding so I can learn?
Thanks in advance!!
> SELECT finger FROM hand WHERE id='3'