Results 1 to 16 of 16

Thread: Dynamics count in user profile and postbit

  1. #1
    Join Date
    Dec 2007
    Posts
    101

    Wink Dynamics count in user profile and postbit

    Good morning everyone!

    OK - the profile tab and postbit info addon for dyna articles is here! :-)

    Please find the attached file for all the necessary plugins/templates.

    There are two new templates to be added and one existing to be modified [postbit or postbit_legacy, depending on what you use].

    Instructions:

    Profile tabs

    1. Add the content of the file memberinfo_block_storybit.html to a template with the name memberinfo_block_storybit
    2. Add the content of the file memberinfo_block_stories.html to a template with the name memberinfo_block_stories
    3. Copy the file memberinfo_block_stories.php to [forums_path]/plugins/
    4. Add the plugin vbulletin-plugin-memberinfo-stories.xml to vbulletin

    Postbit info

    0. Copy the showthread_profile_stories.php in [forums_path]/plugins/
    1. Add the plugin vbulletin-showthread_profile_stories.xml from the folder
    2. Modify the template (postbit or postbit_legacy found in admin cp => Styles => Postbit Templates) to add the following:

    <if condition="$post['nrstories']">
    Stories: $post[nrstories]
    </if>

    where you want it to appear in postbit [after Location.. or.. Posts.. your choice].

    You can also change the word [Stories] above with anything else you prefer [Articles, Reviews, etc.]

    Note: the prefix of the VB ADvanced tables should be 'adv_dyna'. Other settings will be read automatically from the already existing context/installation.

    Let me know if you have any questions.

    For the tab bit - you can specify a priority for the plugin so that it moves the tab in front of others you might have [vbexperience or awards etc].

    I haven't tried this on a multiple-instance installation - it will probably require some minimal changes to the code [multiply the selects from the tables and add to the total, if needed].

    Enjoy!


    Cheers,
    aproape

  2. #2
    Join Date
    Aug 2007
    Location
    Granada, Spain
    Posts
    19

    Default How to change tab name?

    Thank you aproape, installed and works. The only "problem" I have is that I changed Stories for Questions but in the tab in the user profile still shows Stories. I changed the postbit as follows:
    Code:
    <if condition="$post['nrstories']">
    					Questions: $post[nrstories]
    				</if>
    Do I miss anything? Thanks for advanced!

    I found out that "Stories" hs to be changed in memberinfo_block_stories.php, 'title'=> 'Put in what you want"

    But I still observe another problem: The links are not corect for my installation, because Dynamics is not installed in the root directory but in a directory called "terms". On the profile page the link http://thetranslation.org/showentry.php?e=3 should be http://thetranslation.org/terms/showentry.php?e=3 Where can I change that, please?
    Last edited by Janfri; 09-26-2008 at 05:19 AM.

  3. #3
    Join Date
    Dec 2007
    Posts
    101

    Default

    Hi there Janfri!

    The postbit change you did will only affect the postbit information. *smile*

    In order to change the tab name, go to the memberinfo_block_stories.php file [from the /plugins directory], edit it - and change the title from [Stories] to [Questions].

    Hope this helps! Let me know.. :-)


    Cheers,
    aproape

  4. #4
    Join Date
    Dec 2007
    Posts
    101

    Default

    Hi there Janfri - just noticed your reply.

    OK - question for you.. do you have the CMPS module for Dynamics installed?

    [this one: http://www.vbadvanced.com/forum/showthread.php?t=27872]

    Let me know - thanks!


    Cheers,
    aproape

  5. #5
    Join Date
    Aug 2007
    Location
    Granada, Spain
    Posts
    19

    Default Links point to root directory

    Quote Originally Posted by aproape View Post
    Hi there Janfri!

    The postbit change you did will only affect the postbit information. *smile*

    In order to change the tab name, go to the memberinfo_block_stories.php file [from the /plugins directory], edit it - and change the title from [Stories] to [Questions].

    Hope this helps! Let me know.. :-)


    Cheers,
    aproape
    Hi aproape, thank you, yes, after changing the title, the tab name has changed. But what about the wrong links? How do I change the links to the dyna folder. I did not install dyna in the root directory, and, as described above, the links shown in the (now visble) Questions tab do not work...
    Thanks again and best regards
    Janfri

  6. #6
    Join Date
    Mar 2008
    Posts
    367

    Default

    Thanks very much aproape, it works perfectly

    Janfri, for the links go to the template memberinfo_block_storybit and add the folder in front of the links, like that:
    <td><a href="/terms/$story[main_url]">$story[title]</a></td>
    <td><a href="/terms/$categ[main_url]">$categ[title]</a></td>

    Another note: People who use different instances of dynamics have to change:

    In file memberinfo_block_stories.php find
    $stories = $this->registry->db->query_read("SELECT * FROM " . TABLE_PREFIX . "adv_dyna_entries WHERE open > 0 AND userid=" . ((int)$userid));
    and replace adv_dyna with the table-name you use.

    In the same file find
    $categ = $vbulletin->adv_dyna_cats[$story['catid']];
    and replace adv_dyna with the table-name you use.

    In the file showthread_profile_stories.php find
    $stories_cnt = $db->query_read("SELECT COUNT(*) AS nrstories FROM " . TABLE_PREFIX . "adv_dyna_entries WHERE open > 0 AND userid=" . ((int)$post['userid']) . " GROUP BY userid");
    and replace adv_dyna with the table-name you use.

    larina

  7. #7
    Join Date
    Aug 2007
    Location
    Granada, Spain
    Posts
    19

    Thumbs up Change links in memberinfo_block_storybit

    Quote Originally Posted by larina View Post
    Janfri, for the links go to the template memberinfo_block_storybit and add the folder in front of the links, like that:
    <td><a href="/terms/$story[main_url]">$story[title]</a></td>
    <td><a href="/terms/$categ[main_url]">$categ[title]</a></td>
    Thank you very much larina, now it works perfectly. For the future, I would also appreciate the possibility to show the replies to a thread in the postbits and in a cmps module on the frontpage and make replies rateable. But this is off-topic here. Have a nice day everybody!

  8. #8
    Join Date
    Mar 2008
    Posts
    367

    Default

    I just added an addition to it. If you want a link to all dynamics entries of the special user inside the postbit, add the following to your postbit or postbit_legacy template, depending on what you use:

    find:
    $vbphrase[find_more_posts_by_x]</phrase></a></td></tr>

    below it put:
    <if condition="$post['nrstories']"><tr><td class="vbmenu_option"><a href="/yourdynamicsfolder/members/$post[username]-$post[userid]/" rel="nofollow">Rezepte von $post[username] finden</a></td></tr></if>

    Replace yourdynamicsfolder with the folder-name you use for dynamics.
    And translate "Rezepte von ... finden" to your language.

    You see it in the attachment (in my language it is called "Rezepte von mira finden").

    This only works with SEO friendly URLs enabled inside dynamics.

    larina
    Last edited by larina; 09-26-2008 at 09:30 AM.

  9. #9
    Join Date
    Mar 2008
    Posts
    367

    Default

    Just so you know ... if you want to place the dynamics-tab in the members-profile more to the left or more to the right, go to the template MEMBERINFO and find this:

    <div id="profile_tabs">
    $template_hook[profile_left_first]
    $blocks[visitor_messaging]
    $blocks[aboutme]
    $blocks[stats]
    $blocks[friends]
    $blocks[infractions]
    $blocks[contactinfo]
    $template_hook[profile_left_last]
    </div>

    The dynamics-tab is using $template_hook[profile_left_last]
    So place this up to put it more to the left, or just sort all tabs as you want them to appear.

    larina

  10. #10
    Join Date
    Apr 2008
    Posts
    4

    Thumbs down problems

    Hi
    i got this problem when showing user profile page:
    Fatal error: Cannot redeclare construct_categories() (previously declared in /home/forum/includes/vba_dyna_functions.php:904) in /home/Forum/includes/functions_gallery.php on line 176


    Why?
    Whay to do?

  11. #11
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default

    If you upgrade to the latest version of vBa Dynamics then you will not receive that error.

  12. #12
    Join Date
    Oct 2008
    Posts
    22

    Default

    Hi guys,

    I have used this mod and it works really well. I have a question though.

    I would like to add a second tab in the users profile to display info from a second instance of VBA dynamics. Is this possible? At the moment the tab that has been created displays info from my first instance of VBA dynamics but I cannot see any way to get another tab to display with info from a second instance.

    Is this possible?

    Thanks!

  13. #13
    Join Date
    Oct 2008
    Posts
    22

    Default

    just thought I would bump this incase someone has an answer to above?

    Any advice greatly appreciated

    Dylan

  14. #14
    Join Date
    Feb 2009
    Posts
    15

    Default

    Need some help with that

  15. #15
    Join Date
    Aug 2005
    Location
    Durham, UK
    Posts
    177

    Default

    Quote Originally Posted by larina View Post
    I just added an addition to it. If you want a link to all dynamics entries of the special user inside the postbit, add the following to your postbit or postbit_legacy template, depending on what you use:

    find:
    $vbphrase[find_more_posts_by_x]</phrase></a></td></tr>

    below it put:
    <if condition="$post['nrstories']"><tr><td class="vbmenu_option"><a href="/yourdynamicsfolder/members/$post[username]-$post[userid]/" rel="nofollow">Rezepte von $post[username] finden</a></td></tr></if>

    Replace yourdynamicsfolder with the folder-name you use for dynamics.
    And translate "Rezepte von ... finden" to your language.

    You see it in the attachment (in my language it is called "Rezepte von mira finden").

    This only works with SEO friendly URLs enabled inside dynamics.

    larina
    Hi, thank you for this. However, I can only get it to work if I remove the if statements, otherwise the text doesn't show up.
    Sim Fans UK - Sims downloads and discussion

  16. #16
    Join Date
    Aug 2005
    Location
    Durham, UK
    Posts
    177

    Default

    Is there a way to show attachment thumbnails instead of the link to the file?
    Sim Fans UK - Sims downloads and discussion

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Display Link to Dyna in postbit if user has one
    By Lionel in forum Modifications
    Replies: 15
    Last Post: 03-10-2009, 11:38 PM
  2. Dynamics count in postbit and profile
    By tintin74 in forum Module & Modification Discussion & Requests
    Replies: 9
    Last Post: 09-25-2008, 08:10 PM
  3. Add Links count to Postbit
    By trbothead in forum "How Do I..." Questions
    Replies: 1
    Last Post: 02-09-2008, 10:53 AM
  4. Adding "My Zoints Profile" link to postbit legacy?
    By texasf1racer in forum "How Do I..." Questions
    Replies: 5
    Last Post: 12-01-2006, 02:30 PM
  5. put number of links for user in postbit
    By Darax The Good in forum "How Do I..." Questions
    Replies: 2
    Last Post: 05-30-2005, 01:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •