PDA

View Full Version : Custom $post in private messages?


Cyricx
04-27-2005, 01:07 AM
This is for vb 3.0.7

So I've learned how to change the $post query in the showthread.php and showpost.php so that I can query other tables without adding queries using the LEFT JOIN.

And the code works perfect there.

It creates the variables as $post[mapname]

However I can't find the $post query anywhere in the private.php

and of course $post[mapname] just brings up a blank in pms :(

Kinda at my wits end here, any ideas?

Paul M
04-27-2005, 01:46 AM
There is no reason for private.php to query the post table, since PM's have no relevance to posts, they are completely seperate.

Marco van Herwaarden
04-27-2005, 06:12 AM
Use $pm instead of $post.

Cyricx
04-27-2005, 11:07 AM
Would $pm[field31] get the information from a profile field?

Let me be a bit more specific hehe.

I've created a variable that I can use in the postbit template, in the showthread.php and showpost.php I used the $post query to grab it so that it didn't use an extra query. Sorta like how the rpg integration hack works.

In the postbit template I now use $post[mapname] to display that info.

Unfortunately in PM's it just comes up blank. Trying to figure out which query I can fiddle with to add the information the same way and recreate the $post[mapname] variable in there.

I know there has to be a way, because the postbit template is used in PMs and it understands and translates all the $post[xxx] I just can't figure out how it's doing that heh.

Marco van Herwaarden
04-27-2005, 11:15 AM
Profile Fields are stored in the user information array called $bbuserinfo.

You could use: $bbuserinfo[fieldX]

In general, if you are not sure how a variable is called, look in the php-file and in the template, which array's are being used. Then TEMPORARY add the following code to your php script:
echo "<br />Contents of myarray: <pre>";print_r($myarray);echo "</pre>";
Replace myarray with the array you want to inspect.

PS Do this on a testboard, not a live board.