Howdy, I've been trying to work with the XmlRpc licenses.php file for one of my products so I can display their status on their license key and additional addons. I've gotten a little of it situated to where I can activate the license, but can't seem to get any of the variable to show up nor have I figured out how to store them in the database or cache them on disk. Would someone be able to help me out? I posted a topic over at IPS about this, http://community.invisionpower.com/topic/403497-license-key-interacting/ Thanks in Advance, -Don :)
I am trying to get a template hook to only show in certain posts. I seem to have gotten it to work on all posts, but when I chose to only show on a particular post, it shows on all posts but the one I choose. Is there any reason why it won't show on that particular post?
Here is the code I am using:
public function __construct()
$this->registry = ipsRegistry::instance();
public function getOutput()
public function replaceOutput($output, $key)
if (is_array($this->registry->output->getTemplate('topic')->functionData['post']) && count($this->registry->output->getTemplate('topic')->functionData['post']))
$tag = '<!--hook.' . $key . '-->';
$last = 0;
foreach ($this->registry->output->getTemplate('topic')->functionData['post'] as $k => $v)
If change the if ( $pos) to if ( $pos && $v['post']['post']['post_count'] == '5' ) , That post won't show anything in it, but all the others do. What would I need to do to get it only show on that particular post?
OK, so I read the second link you posted and saw that example of that data hook. Would I need to change $data['members'] to $data['topics'] to call the topics table? And how would I link the data hook to one of my custom template bits that will link to an if statement in skin_topics -> post?
EDIT: Would I need to do something similiar to this to add the data to a template bit?
public function handleData( $data )
/* Add additional fields to be queried */
$data['members'] = array_merge( $data['members'], array( 'steamid' ) );
$return = $this->registry->output->getTemplate( 'ng30globalads' )->hookTopicGlobalAds4Below( &data );
/* Return */
I have been searching the documentation on Data Hooks and there is absolutely nothing of value that tells you anything on how to create one. Even searched through topics and posts and couldn't find anything either.
So my question is, what does the basic data hook look like? And how would I go about creating one for "New Topic: First Post" & "New Topic: Topic Data" for fetching Forum ID, & Post ID to display stuff only inside first post, after first post, and after X amount of posts without the use of template edits?
The edits my mod are making, give it settings for showing after a certain amount of posts within a topic. EG: Showing an ad after the 5th post, or 1st post in a topic.
As for the per-skin ad colors; how would I get it to create/update/delete settings? I'd like to replicate a previous mod for how another modder did this for 2.3.6 for the ad colors.
This mod [url="http://www.invisionmodding.com/index.php?autocom=downloads&showfile=623"]located here at IM[/url], creates/updates/deletes settings with-in a certain setting group for each skin that is installed. I'd like to replicate how he did it, but I can't seem to figure it out on 3.1. Since a lot of the coding has changed. I used to use this with my 2.3.6 installation before I upgraded to 3.0.0.
EDIT: How would go about using the $functionData and which type of hook would I have to use? Could you post an example of a hook file using this type of feature please? It's easier for me to learn when I see examples of it being used.
Hey Iestyn, I'll hop on MSN k and give ya hand with it if I can k.
EDIT: Go to FTP and open up -FORUM-ROOT- -> hooks -> boardIndexBoardPanel_*.php,
if ( $this->settings['bp_fposts'] )
$fstats[ $this->lang->words['total_posts'] ] = $stats['total_topics'] + $stats['total_replies'];
if ( $this->settings['bp_fposts'] )
$fstats[ $this->lang->words['total_posts'] ] = $stats['total_replies'];