PDA

View Full Version : Display Link to Dyna in postbit if user has one


Lionel
09-11-2007, 04:03 PM
please delete

KW802
10-25-2007, 08:03 PM
Well, darn... I came searching tonight to see if somebody has already done this or not.

Our Sponsors
 

Lionel
10-25-2007, 08:18 PM
I did it over .... if you need.

KW802
10-25-2007, 08:26 PM
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. :)

Our Sponsors
 

Lionel
10-25-2007, 08:37 PM
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 (http://www.haitiwebs.com/forums/society/47230-une_affaire_davocate_sans_diplomes.html#post96465)

KW802
10-25-2007, 10:34 PM
In showthread.php look forand add (red code above) .... replace with your member catid

and in postbit template

this is what it looks like (http://www.haitiwebs.com/forums/society/47230-une_affaire_davocate_sans_diplomes.html#post96465)Thanks! http://www.coolscifi.com/forums/images/smilies/beerchug.gif

vitoreis
11-11-2007, 08:53 PM
In showthread.php look forand add (red code above) .... replace with your member catid

and in postbit template

this is what it looks like (http://www.haitiwebs.com/forums/society/47230-une_affaire_davocate_sans_diplomes.html#post96465)
What is the member catid?

Lionel
11-11-2007, 08:58 PM
Its the category id in your settings that you set as Members Category.

MichiBeck
09-06-2008, 02:26 PM
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?! :rolleyes:

aproape
09-25-2008, 11:00 PM
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

gv1.3
02-16-2009, 02:20 AM
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!

gv1.3
02-19-2009, 04:13 PM
bump - for ideas or assistance.

Thanks guys

Brian
02-20-2009, 01:05 PM
Use IN() instead. ;)

WHERE catid IN(X, Y, Z)

gv1.3
02-20-2009, 01:40 PM
thanks for the reply Brian. I am very new to this so please bear with me :(

Should it read like this

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.

Brian
02-20-2009, 01:54 PM
Sorry, I misread that. This should be what you're looking for:

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

gv1.3
03-11-2009, 12:38 AM
Thanks Brian that worked perfectly!