Jump to content
WebFlake
  • 0

userInfoPane question


Guest Teregraded

Question

Guest Teregraded

I followed this topic and i made exactly the same thing. ( 

 


Now, I want to know how can I add under posts:

- users likes

- users topics 

 

And how can I make custom profile fields look the same?

Edited by Teregraded
Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0
Guest Teregraded

I want the code witch will show under the posts the users topics and likes.

Edited by Teregraded
Link to comment
Share on other sites

  • 0

for likes use this hook 

http://webflake.sx/files/file/729-tb-show-reputation-in-user-info-310/

Update 

 

for the topics you can use this

<php>$topics=ipsRegistry::DB()->buildAndFetch(array('select' => 'count(*) as count','from'=>'topics','where'=>'starter_id='.$author['author_id']));</php>
<if test="$topics['count']>0"><li> topics: {$topics['count']}</li></if>

Of course you can change the word topics: to whatever you like...

Edited by Lock Down
Link to comment
Share on other sites

  • 0
Guest Teregraded

for likes use this hook 

http://webflake.sx/files/file/729-tb-show-reputation-in-user-info-310/

Update 

 

for the topics you can use this

<php>$topics=ipsRegistry::DB()->buildAndFetch(array('select' => 'count(*) as count','from'=>$this->settings['sql_tbl_prefix'].'topics','where'=>'starter_id='.$author['author_id']));</php>
<if test="$topics['count']>0"><li> topics: {$topics['count']}</li></if>

Of course you can change the word topics: to whatever you like...

 

Isn't working. Btw I want it to be all like THAT TOPIC created, no hooks. I want it for exemple: "topics" in blue, left positioned and the number of topics in right, white, or gray. Look at the topic. 

 

This is the code I want to be modified with topics and user reputation:

 

 

<div class="extraUserInfo">
<if test="postCount:|:$author['member_id']">
<dl class="pairsJustified">
<dt>{$this->lang->words['m_posts']}</dt>
                <dd>{parse expression="$this->registry->getClass('class_localization')->formatNumber( intval( $author['posts'] ) )"}</dd> 
</dl>
</if>
</div>
Edited by Teregraded
Link to comment
Share on other sites

  • 0

How can you say it doesn't work?? Of course it works.

 

Why are you showing code for posts when you want topics. Didn't you at least setup the css and language parts???

 

Here it is with hard coded language

<php>$topics=ipsRegistry::DB()->buildAndFetch(array('select' => 'count(*) as count','from'=>'topics','where'=>'starter_id='.$author['author_id']));</php>
<div class="extraUserInfo">
<if test="topicCount:|:$topics['count']>0">
<dl class="pairsJustified">
<dt> Topics: </dt>
                <dd>{parse expression="$this->registry->getClass('class_localization')->formatNumber( intval( $topics['count']) )"}</dd> 
</dl>
</if>
</div>
Edited by Lock Down
Link to comment
Share on other sites

  • 0
Guest Teregraded

 

How can you say it doesn't work?? Of course it works.

 

Why are you showing code for posts when you want topics. Didn't you at least setup the css and language parts???

 

Here it is with hard coded language

<php>$topics=ipsRegistry::DB()->buildAndFetch(array('select' => 'count(*) as count','from'=>$this->settings['tbl_prefix'].'topics','where'=>'starter_id='.$author['author_id']));</php>
<div class="extraUserInfo">
<if test="topicCount:|:$topics['count']>0">
<dl class="pairsJustified">
<dt> Topics: </dt>
                <dd>{parse expression="$this->registry->getClass('class_localization')->formatNumber( intval( $topics['count']) )"}</dd> 
</dl>
</if>
</div>

 

When I put this into my userInfoPane and press save, i get a "Driver Error". The page can't connect to the database.

Link to comment
Share on other sites

  • 0
Guest Teregraded

What version ipb are you running?  If you want pm me an admin login and I will look at it.

 

And you are putting it in the userinfopane template??

 

Also check the logs in admin panel for sql errors.

 

I sent you a PM with an demo account. Try to resolve it.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...