Sep 24, 2007, 01:11 AM
Pages: 1 2
Sep 24, 2007, 10:17 AM
Do you have a custom theme ? Cause on the default theme its already centered.
Sep 24, 2007, 04:24 PM
yes i do have a custom theme. How can i center it? What template do i edit?
Sep 24, 2007, 04:34 PM
You will need to add a span around the tag in inc/plugins.php. Look for the myps_display() function. Where it displays you need to add span tags around it along with a center css (text-align). That should do it.
Sep 24, 2007, 05:35 PM
Code:
function myps_display($post)
{
global $mybb, $db, $lang, $plugins;
$plugins->run_hooks("myps_display_start");
$language = $mybb->settings['bblanguage'];
$lang->load("myps");
$lang->set_language($mybb->settings['bblanguage']);
if ($mybb->settings['myps_status'] != "off" && $post['uid'] != 0){
$result = $db->query("SELECT * FROM `".TABLE_PREFIX."users` WHERE uid='".$post['uid']."'");
$show = $db->fetch_array($result);
$myps = round($show['myps'],$mybb->settings['myps_decimal']);
$post['user_details'] = "<span class=\"smalltext\">{$post['user_details']} ".$mybb->settings['myps_name'].": <a href=\"myps.php?action=donate&username=". $post['username']. "\">$myps</a></b>";
if($mybb->user['usergroup'] == "4" && $mybb->settings['myps_allowmod'] == 'mypspermadmin') {
$post['user_details'] .= "<span class=\"smalltext\"> (<a href=\"myps.php?action=moderate&username=". $post['username']. "\">". $lang->myps_edit. "</a>)";
}
if(($mybb->user['usergroup'] == "3" || $mybb->user['usergroup'] == "4") && ($mybb->settings['myps_allowmod'] == 'mypspermsmods')) {
$post['user_details'] .= "<span class=\"smalltext\"> (<a href=\"myps.php?action=moderate&username=". $post['username']. "\">". $lang->myps_edit. "</a>)";
}
if((is_moderator($fid) == "yes") && ($mybb->settings['myps_allowmod'] == 'mypspermall')) {
$post['user_details'] .= "<span class=\"smalltext\"> (<a href=\"myps.php?action=moderate&username=". $post['username']. "\">". $lang->myps_edit. "</a>)";
}
$post['user_details'] .= "<br /></span>";
}
$plugins->run_hooks("myps_display_end");
}ok i found it can you edit it to show how its supposed to look like? please
Sep 24, 2007, 06:23 PM
Try this:
PHP Code:
function myps_display($post)
{
global $mybb, $db, $lang, $plugins;
$plugins->run_hooks("myps_display_start");
$language = $mybb->settings['bblanguage'];
$lang->load("myps");
$lang->set_language($mybb->settings['bblanguage']);
if ($mybb->settings['myps_status'] != "off" && $post['uid'] != 0){
$result = $db->query("SELECT * FROM `".TABLE_PREFIX."users` WHERE uid='".$post['uid']."'");
$show = $db->fetch_array($result);
$myps = round($show['myps'],$mybb->settings['myps_decimal']);
$post['user_details'] = "<span class=\"smalltext\" style=\"text-align:center\">{$post['user_details']} ".$mybb->settings['myps_name'].": <a href=\"myps.php?action=donate&username=". $post['username']. "\">$myps</a></b>";
if($mybb->user['usergroup'] == "4" && $mybb->settings['myps_allowmod'] == 'mypspermadmin') {
$post['user_details'] .= "<span class=\"smalltext\" style=\"text-align:center\">> (<a href=\"myps.php?action=moderate&username=". $post['username']. "\">". $lang->myps_edit. "</a>)";
}
if(($mybb->user['usergroup'] == "3" || $mybb->user['usergroup'] == "4") && ($mybb->settings['myps_allowmod'] == 'mypspermsmods')) {
$post['user_details'] .= "<span class=\"smalltext\" style=\"text-align:center\">> (<a href=\"myps.php?action=moderate&username=". $post['username']. "\">". $lang->myps_edit. "</a>)";
}
if((is_moderator($fid) == "yes") && ($mybb->settings['myps_allowmod'] == 'mypspermall')) {
$post['user_details'] .= "<span class=\"smalltext\" style=\"text-align:center\">> (<a href=\"myps.php?action=moderate&username=". $post['username']. "\">". $lang->myps_edit. "</a>)";
}
$post['user_details'] .= "<br /></span>";
}
$plugins->run_hooks("myps_display_end");
}
Sep 24, 2007, 08:19 PM
Nope its still in the same place but now it looks like this: Points: 7> (Edit)
you can see it here: http://www.console-crazy.com/showthread.php?tid=95
thanks for helping me i really appreciate it.
you can see it here: http://www.console-crazy.com/showthread.php?tid=95
thanks for helping me i really appreciate it.

Sep 24, 2007, 11:29 PM
That damn VB template causes too many problems and I really wish people would stop using it.
Undo all the change we did.
Use this solution from Lex.
var : variable ; like $post['userdetails']
Open ./inc/plugins/myps.php
Find [ function myps_display($post) ]
Replace the whole function with this
Then you can use {$post['user_myps']} in your postbit template for showing the points where you want.
Try that.
Undo all the change we did.
Use this solution from Lex.
var : variable ; like $post['userdetails']
Open ./inc/plugins/myps.php
Find [ function myps_display($post) ]
Replace the whole function with this
PHP Code:
function myps_display($post)
{
global $mybb, $db, $lang, $plugins;
$plugins->run_hooks("myps_display_start");
$language = $mybb->settings['bblanguage'];
$lang->load("myps");
$lang->set_language($mybb->settings['bblanguage']);
if ($mybb->settings['myps_status'] != "off" && $post['uid'] != 0)
{
$result = $db->query("SELECT * FROM `".TABLE_PREFIX."users` WHERE uid='".$post['uid']."'");
$show = $db->fetch_array($result);
$myps = round($show['myps'],$mybb->settings['myps_decimal']);
$post['user_myps'] = "<span class=\"smalltext\">{$mybb->settings['myps_name']} : <a href=\"myps.php?action=donate&username={$post['username']}\">{$myps}</a></b>";
if($mybb->user['usergroup'] == "4" && $mybb->settings['myps_allowmod'] == 'mypspermadmin')
{
$post['user_myps'] .= "<span class=\"smalltext\"> (<a href=\"myps.php?action=moderate&username={$post['username']} \">{$lang->myps_edit}</a>)";
}
if(($mybb->user['usergroup'] == "3" || $mybb->user['usergroup'] == "4") && ($mybb->settings['myps_allowmod'] == 'mypspermsmods'))
{
$post['user_myps'] .= "<span class=\"smalltext\"> (<a href=\"myps.php?action=moderate&username={$post['username']} \">{$lang->myps_edit}</a>)";
}
if((is_moderator($fid) == "yes") && ($mybb->settings['myps_allowmod'] == 'mypspermall'))
{
$post['user_myps'] .= "<span class=\"smalltext\"> (<a href=\"myps.php?action=moderate&username={$post['username']} \">{$lang->myps_edit}</a>)";
}
}
$plugins->run_hooks("myps_display_end");
}
Then you can use {$post['user_myps']} in your postbit template for showing the points where you want.
Try that.
Sep 25, 2007, 01:10 PM
tried that method. Now i cant see it at all. I put {$post['user_myps']} in post bit template/postbit_author_user
Template:
im thinking that i can live with it not being centered on the mybulletin as long as it works perfect with all other themes.
Thanks for the help.
-IncadudeF
Template:
Code:
<center><span style="font-size:large; font-weight:bolder;">{$post['profilelink']}</span> {$post['onlinestatus']} {$post['iplogged']}<br /></center>
<center>
<span class="smalltext">
{$post['usertitle']}<br />
{$post['userstars']}<br />
{$post['groupimage']}</span>
{$post['useravatar']}<br /><br />
<span class="smalltext">
{$lang->postbit_joined} {$post['userregdate']}<br />
{$lang->postbit_posts} {$post['postnum']}<br />
{$lang->postbit_reputation} {$post['userreputation']}<br/>
{$post['user_myps']}</span>
</center>im thinking that i can live with it not being centered on the mybulletin as long as it works perfect with all other themes.
Thanks for the help.

-IncadudeF
Sep 25, 2007, 01:20 PM
Hmm..that should work though. I wonder if the hook has to be changed.
Pages: 1 2