Jump to content

(e34) Points Per Name Style


(e) Eric
 Share

Recommended Posts

I'll look at the installer when I get home. I'm guessing something changed with the hook install processor 3.3, that is disabling the new fields from being added.

Since your main board already has PPNS installed, it should work fine once you upgrade to 3.3.

Link to comment
Share on other sites

  • 1 month later...

I was going to wait to fix all three spots where the name isn't customized, but I went ahead and released version 1.0.2 which fixes 2 of the 3 spots and fixes the DB error.

New Version: 1.0.2


What's New in Version 1.0.2 (See full changelog)

  • Fixed 2 of 3 broken spots in 3.3: active users for forums/topics
  • Edited default db values to work with 3.3
Link to comment
Share on other sites

  • 2 weeks later...
  • 6 months later...

Eric buddy old pal :D

I didn't have this issue on 3.3.4, but since updating to 3.4.1 I have the issue below.

This happens on IP.Board skin as well.

Hook off

post-155379-0-42052000-1356226859_thumb.

Hook on

post-155379-0-06709500-1356226866_thumb.

see the broken avatar and '<' where user name should be. Hope you'll look at this, I really really like to have this enabled :smile: Thanks.

EDIT:

Appears the issue is gone when I remove this from the hook. But the display names are still styled.... O.o

    <file>
      <hook_file_real>ibEconomyPPNSSkinSearch.php</hook_file_real>
      <hook_type>skinHooks</hook_type>
      <hook_classname>ibEconomyPPNSSkinSearch</hook_classname>
      <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:11:"skin_search";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data>
      <hooks_source><![CDATA[/**
 * (TB) Group Format
 * @file		ibEconomyPPNSSkinSearch.php 	Skin overloader (skin_search)
 *
 * @copyright	© 2006 - 2011 Invision Byte
 * @link		http://www.invisionbyte.net/
 * @author		Terabyte
 * @since		03/09/2009
 * @updated		23/10/2011
 * @version		4.0.0 (40000)
 */
class ibEconomyPPNSSkinSearch extends skin_search(~id~)
{
	public function __construct( ipsRegistry $registry )
	{
		parent::__construct( $registry );
		
		/* Load our class and setup prefixes */
		require_once( IPSLib::getAppDir( 'ibEconomy' ) . '/sources/plugins/ppns/ppnsLib.php' );
		ppnsLib::setGuestPrefixes();
	}
	
	public function topicPostSearchResultAsForum( $data, $resultAsTitle=false )
	{
		if ( IPSSearchRegistry::get('opt.noPostPreview') && ipsRegistry::$settings['eco_plugin_ppns_on'] && ($data['ibEco_plugin_ppns_prefix'] || $data['ibEco_plugin_ppns_suffix'] || $this->settings['eco_plugin_ppns_use_gf']) )
		{
			#BUG HERE!!1
			$resultPrefix = $data['ibEco_plugin_ppns_prefix'];
			$resultSuffix = $data['ibEco_plugin_ppns_prefix'];
			
			$data['ibEco_plugin_ppns_prefix'] = $data['last_poster_prefix'];
			$data['ibEco_plugin_ppns_suffix'] = $data['last_poster_suffix'];
			$data['last_poster'] = $data['last_poster_id'] ? IPSMember::makeProfileLink( ppnsLib::makeNameFormatted( $data, $data['last_poster_name'], $data['last_poster_group'], 'last_poster_id' ), $data['last_poster_id'], $data['seo_last_name'] ) : $this->settings['guest_name_pre'] . $data['last_poster_name'] . $this->settings['guest_name_suf'];
			
			#echo($data['ibEco_plugin_ppns_prefix']."  sdfsdfsdfsdfsdfsdf ".$data['ibEco_plugin_ppns_suffix']);
			#echo"<pre>";
			#print_r($data);
			
			$data['ibEco_plugin_ppns_prefix'] = $data['starter_prefix'];
			$data['ibEco_plugin_ppns_suffix'] = $data['starter_suffix'];
			$data['starter']     = $data['starter_id']     ? IPSMember::makeProfileLink( ppnsLib::makeNameFormatted( $data, $data['starter_name'], $data['starter_group'], 'starter_id' ), $data['starter_id'], $data['seo_first_name'] ) : $this->settings['guest_name_pre'] . $data['starter_name'] . $this->settings['guest_name_suf'];
			
			$data['ibEco_plugin_ppns_prefix'] = $resultPrefix;
			$data['ibEco_plugin_ppns_suffix'] = $resultSuffix;			
		}
		
		return parent::topicPostSearchResultAsForum( $data, $resultAsTitle );
	}
	
	public function memberSearchResult( $r, $resultAsTitle=false )
	{
		if ( ipsRegistry::$settings['eco_plugin_ppns_on'] && IPSSearchRegistry::get('set.returnType') == 'tids' && $r['ibEco_plugin_ppns_prefix'] || $r['ibEco_plugin_ppns_suffix'] || $this->settings['eco_plugin_ppns_use_gf'])
		{	
			$r['content_title'] = IPSMember::makeNameFormatted( $r['content_title'], $r['member_group_id'], $r['ibEco_plugin_ppns_prefix'], $r['ibEco_plugin_ppns_suffix'] );
		}
		
		return parent::memberSearchResult( $r, $resultAsTitle );
	}
	
	public function followedContentForumsWrapperForums( $results )
	{
		if ( ipsRegistry::$settings['eco_plugin_ppns_on'] && count($results) )
		{
			foreach( $results as $rid => $rdata )
			{
				$results[ $rid ]['last_poster_name'] = ppnsLib::makeNameFormatted( $rdata, $rdata['last_poster_name'], 0, 'last_poster_id' );
			}
		}
		
		return parent::followedContentForumsWrapperForums( $results );
	}
}]]></hooks_source>
    </file>
Link to comment
Share on other sites

  • 2 weeks later...

No, I've never seen that before. Wait, you mean that is just in your PHP error logs and doesn't actually effect board use? (like no errors are presented to the user?)

As far as I can tell no error logs are presented to the user, I'm seeing this is my webservers error log, I use nginx and that generated it, I think the dude above is using apache, just a guess. But how can we get rid of it ?

Link to comment
Share on other sites

Ah, those are PHP warnings and so they are't overly critical. But after doing some searches here I found the reason is because some of those template hooks are overloading functions whose parameters have changed, hence the warnings.

I can't attach files here, so go here and download/import the updated hook and post if the logs stop: http://emoneycodes.com/forums/topic/279-e32-points-per-name-style/?p=3181

Link to comment
Share on other sites

Fatal error: Call to undefined method ppnsLib::getUsersIn() in /home2/phluxoro/public_html/hooks/ibEconomyPPNSActionTopic_6fcd1d04e37043503ab2c9712b832429.php on line 22


im getting this error now

i seen the above post where the person had the same problem with the viewnewcontent did what he did
messed up my site now i cant go into topics or anything i reverted back to what i had before and still a now go

this really messed me up

idk what to do now

Link to comment
Share on other sites

Fatal error: Call to undefined method ppnsLib::getUsersIn() in /home2/phluxoro/public_html/hooks/ibEconomyPPNSActionTopic_6fcd1d04e37043503ab2c9712b832429.php on line 22


im getting this error now

i seen the above post where the person had the same problem with the viewnewcontent did what he did
messed up my site now i cant go into topics or anything i reverted back to what i had before and still a now go

this really messed me up

idk what to do now

check to see if you have Custom Name Style mod installed. If you do remove it and everything should work.

Link to comment
Share on other sites

check to see if you have Custom Name Style mod installed. If you do remove it and everything should work.

That the first thing i check when i see all the other errors i dont have it installed and havnt had it installed since it came out

but i got this fixed i dont excatly remember how i did, i did alot of things to get this working again to much to remember lol

Link to comment
Share on other sites

Screen%20Shot%202013-01-27%20at%2019.18.

Seems that the group formatting part of this hook is causing this to happen on IPB 3.4.2's View New Content page. If I disable the hook entirely everything looks normal. If I disable the option "Default to (TB) Group Format" everything works fine.

Screen%20Shot%202013-01-27%20at%2019.23.

Any ideas? :smile:

I've reported this and nothing has been done as far as I know. Eric says he'll update his hook when the author of the Name Style hook updated it.

To stop new content, search etc from being messed up like in your screenshot. Open hook.xml and remove this.

    <file>
      <hook_file_real>ibEconomyPPNSSkinSearch.php</hook_file_real>
      <hook_type>skinHooks</hook_type>
      <hook_classname>ibEconomyPPNSSkinSearch</hook_classname>
      <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:11:"skin_search";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data>
      <hooks_source><![CDATA[/**
 * (TB) Group Format
 * @file		ibEconomyPPNSSkinSearch.php 	Skin overloader (skin_search)
 *
 * @copyright	© 2006 - 2011 Invision Byte
 * @link		http://www.invisionbyte.net/
 * @author		Terabyte
 * @since		03/09/2009
 * @updated		23/10/2011
 * @version		4.0.0 (40000)
 */
class ibEconomyPPNSSkinSearch extends skin_search(~id~)
{
	public function __construct( ipsRegistry $registry )
	{
		parent::__construct( $registry );
		
		/* Load our class and setup prefixes */
		require_once( IPSLib::getAppDir( 'ibEconomy' ) . '/sources/plugins/ppns/ppnsLib.php' );
		ppnsLib::setGuestPrefixes();
	}
	
	public function topicPostSearchResultAsForum( $data, $resultAsTitle=false )
	{
		if ( IPSSearchRegistry::get('opt.noPostPreview') && ipsRegistry::$settings['eco_plugin_ppns_on'] && ($data['ibEco_plugin_ppns_prefix'] || $data['ibEco_plugin_ppns_suffix'] || $this->settings['eco_plugin_ppns_use_gf']) )
		{
			#BUG HERE!!1
			$resultPrefix = $data['ibEco_plugin_ppns_prefix'];
			$resultSuffix = $data['ibEco_plugin_ppns_prefix'];
			
			$data['ibEco_plugin_ppns_prefix'] = $data['last_poster_prefix'];
			$data['ibEco_plugin_ppns_suffix'] = $data['last_poster_suffix'];
			$data['last_poster'] = $data['last_poster_id'] ? IPSMember::makeProfileLink( ppnsLib::makeNameFormatted( $data, $data['last_poster_name'], $data['last_poster_group'], 'last_poster_id' ), $data['last_poster_id'], $data['seo_last_name'] ) : $this->settings['guest_name_pre'] . $data['last_poster_name'] . $this->settings['guest_name_suf'];
			
			#echo($data['ibEco_plugin_ppns_prefix']."  sdfsdfsdfsdfsdfsdf ".$data['ibEco_plugin_ppns_suffix']);
			#echo"<pre>";
			#print_r($data);
			
			$data['ibEco_plugin_ppns_prefix'] = $data['starter_prefix'];
			$data['ibEco_plugin_ppns_suffix'] = $data['starter_suffix'];
			$data['starter']     = $data['starter_id']     ? IPSMember::makeProfileLink( ppnsLib::makeNameFormatted( $data, $data['starter_name'], $data['starter_group'], 'starter_id' ), $data['starter_id'], $data['seo_first_name'] ) : $this->settings['guest_name_pre'] . $data['starter_name'] . $this->settings['guest_name_suf'];
			
			$data['ibEco_plugin_ppns_prefix'] = $resultPrefix;
			$data['ibEco_plugin_ppns_suffix'] = $resultSuffix;			
		}
		
		return parent::topicPostSearchResultAsForum( $data, $resultAsTitle );
	}
	
	public function memberSearchResult( $r, $resultAsTitle=false )
	{
		if ( ipsRegistry::$settings['eco_plugin_ppns_on'] && IPSSearchRegistry::get('set.returnType') == 'tids' && $r['ibEco_plugin_ppns_prefix'] || $r['ibEco_plugin_ppns_suffix'] || $this->settings['eco_plugin_ppns_use_gf'])
		{	
			$r['content_title'] = IPSMember::makeNameFormatted( $r['content_title'], $r['member_group_id'], $r['ibEco_plugin_ppns_prefix'], $r['ibEco_plugin_ppns_suffix'] );
		}
		
		return parent::memberSearchResult( $r, $resultAsTitle );
	}
	
	public function followedContentForumsWrapperForums( $results )
	{
		if ( ipsRegistry::$settings['eco_plugin_ppns_on'] && count($results) )
		{
			foreach( $results as $rid => $rdata )
			{
				$results[ $rid ]['last_poster_name'] = ppnsLib::makeNameFormatted( $rdata, $rdata['last_poster_name'], 0, 'last_poster_id' );
			}
		}
		
		return parent::followedContentForumsWrapperForums( $results );
	}
}]]></hooks_source>
    </file> 

Then reimport hook.xml :)

Link to comment
Share on other sites

I've reported this and nothing has been done as far as I know. Eric says he'll update his hook when the author of the Name Style hook updated it.

To stop new content, search etc from being messed up like in your screenshot. Open hook.xml and remove this.

    <file>
      <hook_file_real>ibEconomyPPNSSkinSearch.php</hook_file_real>
      <hook_type>skinHooks</hook_type>
      <hook_classname>ibEconomyPPNSSkinSearch</hook_classname>
      <hook_data><![CDATA[a:8:{s:12:"dataLocation";s:0:"";s:14:"libApplication";s:0:"";s:15:"classToOverload";s:11:"skin_search";s:9:"skinGroup";N;s:12:"skinFunction";N;s:4:"type";N;s:2:"id";N;s:8:"position";N;}]]></hook_data>
      <hooks_source><![CDATA[/**
 * (TB) Group Format
 * @file		ibEconomyPPNSSkinSearch.php 	Skin overloader (skin_search)
 *
 * @copyright	© 2006 - 2011 Invision Byte
 * @link		http://www.invisionbyte.net/
 * @author		Terabyte
 * @since		03/09/2009
 * @updated		23/10/2011
 * @version		4.0.0 (40000)
 */
class ibEconomyPPNSSkinSearch extends skin_search(~id~)
{
	public function __construct( ipsRegistry $registry )
	{
		parent::__construct( $registry );
		
		/* Load our class and setup prefixes */
		require_once( IPSLib::getAppDir( 'ibEconomy' ) . '/sources/plugins/ppns/ppnsLib.php' );
		ppnsLib::setGuestPrefixes();
	}
	
	public function topicPostSearchResultAsForum( $data, $resultAsTitle=false )
	{
		if ( IPSSearchRegistry::get('opt.noPostPreview') && ipsRegistry::$settings['eco_plugin_ppns_on'] && ($data['ibEco_plugin_ppns_prefix'] || $data['ibEco_plugin_ppns_suffix'] || $this->settings['eco_plugin_ppns_use_gf']) )
		{
			#BUG HERE!!1
			$resultPrefix = $data['ibEco_plugin_ppns_prefix'];
			$resultSuffix = $data['ibEco_plugin_ppns_prefix'];
			
			$data['ibEco_plugin_ppns_prefix'] = $data['last_poster_prefix'];
			$data['ibEco_plugin_ppns_suffix'] = $data['last_poster_suffix'];
			$data['last_poster'] = $data['last_poster_id'] ? IPSMember::makeProfileLink( ppnsLib::makeNameFormatted( $data, $data['last_poster_name'], $data['last_poster_group'], 'last_poster_id' ), $data['last_poster_id'], $data['seo_last_name'] ) : $this->settings['guest_name_pre'] . $data['last_poster_name'] . $this->settings['guest_name_suf'];
			
			#echo($data['ibEco_plugin_ppns_prefix']."  sdfsdfsdfsdfsdfsdf ".$data['ibEco_plugin_ppns_suffix']);
			#echo"<pre>";
			#print_r($data);
			
			$data['ibEco_plugin_ppns_prefix'] = $data['starter_prefix'];
			$data['ibEco_plugin_ppns_suffix'] = $data['starter_suffix'];
			$data['starter']     = $data['starter_id']     ? IPSMember::makeProfileLink( ppnsLib::makeNameFormatted( $data, $data['starter_name'], $data['starter_group'], 'starter_id' ), $data['starter_id'], $data['seo_first_name'] ) : $this->settings['guest_name_pre'] . $data['starter_name'] . $this->settings['guest_name_suf'];
			
			$data['ibEco_plugin_ppns_prefix'] = $resultPrefix;
			$data['ibEco_plugin_ppns_suffix'] = $resultSuffix;			
		}
		
		return parent::topicPostSearchResultAsForum( $data, $resultAsTitle );
	}
	
	public function memberSearchResult( $r, $resultAsTitle=false )
	{
		if ( ipsRegistry::$settings['eco_plugin_ppns_on'] && IPSSearchRegistry::get('set.returnType') == 'tids' && $r['ibEco_plugin_ppns_prefix'] || $r['ibEco_plugin_ppns_suffix'] || $this->settings['eco_plugin_ppns_use_gf'])
		{	
			$r['content_title'] = IPSMember::makeNameFormatted( $r['content_title'], $r['member_group_id'], $r['ibEco_plugin_ppns_prefix'], $r['ibEco_plugin_ppns_suffix'] );
		}
		
		return parent::memberSearchResult( $r, $resultAsTitle );
	}
	
	public function followedContentForumsWrapperForums( $results )
	{
		if ( ipsRegistry::$settings['eco_plugin_ppns_on'] && count($results) )
		{
			foreach( $results as $rid => $rdata )
			{
				$results[ $rid ]['last_poster_name'] = ppnsLib::makeNameFormatted( $rdata, $rdata['last_poster_name'], 0, 'last_poster_id' );
			}
		}
		
		return parent::followedContentForumsWrapperForums( $results );
	}
}]]></hooks_source>
    </file> 

Then reimport hook.xml :smile:

Just deleting the ibEconomyPPNSSkinSearch.php from my /hooks directory fixed it - thanks!

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

I just upgraded to latest IPB software and I'm getting this php error again:

[31-Mar-2013 23:16:30 UTC] PHP Strict Standards: Declaration of ibEconomyPPNSSkinStats::group_strip() should be compatible with that of skin_stats_35::group_strip() in /home/gamingfo/public_html/ipbgf/admin/sources/classes/output/publicOutput.php(3817) : eval()'d code on line 109

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...