Results 1 to 16 of 16

Thread: Display Link to Dyna in postbit if user has one

  1. #1
    Join Date
    Jan 2004
    Location
    Miami
    Posts
    1,040

    Default Display Link to Dyna in postbit if user has one

    please delete
    Last edited by Lionel; 09-13-2007 at 07:03 AM.

  2. #2
    Join Date
    Mar 2004
    Location
    A galaxy far, far away...
    Posts
    6,609

    Default Re: Display Link to Dyna in postbit if user has one

    Well, darn... I came searching tonight to see if somebody has already done this or not.

  3. #3
    Join Date
    Jan 2004
    Location
    Miami
    Posts
    1,040

    Default Re: Display Link to Dyna in postbit if user has one

    I did it over .... if you need.

  4. #4
    Join Date
    Mar 2004
    Location
    A galaxy far, far away...
    Posts
    6,609

    Default Re: Display Link to Dyna in postbit if user has one

    Quote Originally Posted by Lionel View Post
    I did it over .... if you need.
    If you don't mind sharing, anything you may have come up with already I'd appreciate being able to use as a starting point.

  5. #5
    Join Date
    Jan 2004
    Location
    Miami
    Posts
    1,040

    Default Re: Display Link to Dyna in postbit if user has one

    In showthread.php look for
    $posts = $db->query_read("
    SELECT
    post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,
    user.*, userfield.*, usertextfield.*, blog.userid as blogid,

    ....... in same query few lines below ......

    $hook_query_fields
    FROM " . TABLE_PREFIX . "post AS post
    LEFT JOIN " . TABLE_PREFIX . "adv_dyna_memberscats as blog ON(post.userid = blog.userid and blog.catid=XX)
    and add (red code above) .... replace XX with your member catid

    and in postbit template

    <if condition="$post[blogid]">
    <br /><strong>
    <a href="blogs/browsecategory.php?do=member&entryuserid=$post[blogid]">$post[username]'s Blog</a>
    </strong>
    <br />
    </if>
    this is what it looks like
    Last edited by Lionel; 11-11-2007 at 08:55 PM.

  6. #6
    Join Date
    Mar 2004
    Location
    A galaxy far, far away...
    Posts
    6,609

    Default Re: Display Link to Dyna in postbit if user has one

    Quote Originally Posted by Lionel View Post
    In showthread.php look forand add (red code above) .... replace with your member catid

    and in postbit template

    this is what it looks like
    Thanks!

  7. #7

    Default Re: Display Link to Dyna in postbit if user has one

    Quote Originally Posted by Lionel View Post
    In showthread.php look forand add (red code above) .... replace with your member catid

    and in postbit template

    this is what it looks like
    What is the member catid?

  8. #8
    Join Date
    Jan 2004
    Location
    Miami
    Posts
    1,040

    Default Re: Display Link to Dyna in postbit if user has one

    Its the category id in your settings that you set as Members Category.

  9. #9
    Join Date
    Nov 2006
    Posts
    5

    Default

    I used this modification with vb 3.7.0.

    After an update to 3.7.3 PL1 I did the changes to the files again but it does not work any more. I can't find the reason. Any tips?!

  10. #10
    Join Date
    Dec 2007
    Posts
    101

    Default

    Hi there,

    See the thread in this forum:

    http://www.vbadvanced.com/forum/showthread.php?t=31762

    Maybe it will help your purpose.


    Cheers,
    aproape

  11. #11
    Join Date
    Oct 2008
    Posts
    22

    Default

    Hi guys this worked really well for me however I recently added some more categories to my Dynamics section and now I need to add the category ID's for these new categories.

    My problem is that if I attempt to add more than one catID to the showthread.php part above I get an SQL error. After catid= I need to add numerous cat ID's is this possible? I have tried seperating them by commas etc but that is not working.

    LEFT JOIN " . TABLE_PREFIX . "adv_dyna_memberscats as blog ON(post.userid = blog.userid and blog.catid=XX)

    I would appreciate any help or advice you can give on this.
    Thanks!

  12. #12
    Join Date
    Oct 2008
    Posts
    22

    Default

    bump - for ideas or assistance.

    Thanks guys

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

    Default

    Use IN() instead.

    Code:
    WHERE catid IN(X, Y, Z)

  14. #14
    Join Date
    Oct 2008
    Posts
    22

    Default

    thanks for the reply Brian. I am very new to this so please bear with me

    Should it read like this

    Code:
    LEFT JOIN " . TABLE_PREFIX . "adv_dyna_memberscats as blog ON(post.userid = blog.userid and WHERE catid IN(X, Y, Z))
    Again sorry but as you can probably see I am not too great at coding.

    Thanks again for your help.

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

    Default

    Sorry, I misread that. This should be what you're looking for:

    Code:
    LEFT JOIN " . TABLE_PREFIX . "adv_dyna_memberscats as blog ON(post.userid = blog.userid AND blog.catid IN(X, Y, Z))

  16. #16
    Join Date
    Oct 2008
    Posts
    22

    Default

    Thanks Brian that worked perfectly!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Dyna mimics a forum on forumhome
    By eJM in forum "How Do I..." Questions
    Replies: 8
    Last Post: 09-08-2007, 10:50 PM
  2. Display User IP address in welcome block
    By Scarlet H in forum Module & Modification Discussion & Requests
    Replies: 0
    Last Post: 03-29-2007, 07:00 PM
  3. Adding "My Zoints Profile" link to postbit legacy?
    By texasf1racer in forum "How Do I..." Questions
    Replies: 5
    Last Post: 12-01-2006, 03:30 PM
  4. Display a last X post by logged in user
    By The Ottoman in forum "How Do I..." Questions
    Replies: 1
    Last Post: 01-24-2006, 04:53 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, 02: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
  •