Wordpress site private messages php help needed

Scorpion Ghost

Elite Member
Executive VIP
Jr. VIP
Joined
Mar 22, 2013
Messages
9,153
Reaction score
10,492
Hey guys. I need some help to do something on my website. I don't know how to do it myself, but I do know what needs to be done. So here's the deal.

This code is located in 2 php files in my theme and it's the Contact button:

Code:
[B]<?php[/B]
                                                               
[B]                                                                $using_perm = PricerrTheme_using_permalinks();[/B]
               
[B]                                                                if($using_perm)      $privurl_m = get_permalink(get_option('PricerrTheme_my_account_priv_mess_page_id')). "/?";[/B]
[B]                                                                else $privurl_m = get_bloginfo('siteurl'). "/?page_id=". get_option('PricerrTheme_my_account_priv_mess_page_id'). "&";   [/B]
                                                               
[B]                                                                ?>[/B]
[B]                <p class="contact-slr-wrp-profile"><a href="<?php echo $privurl_m; ?>priv_act=send&pid=<?php the_ID(); ?>&uid=<?php echo $author->ID; ?>"[/B]
[B]                     class="contact-seller-tngey"><?php _e("Contact Seller","PricerrTheme"); ?></a></p>[/B]


And the code above calls this code, which is in functions.php:

Code:
<?php
        
            $pid = $_GET['pid'];
            $uid = $_GET['uid'];
        
            $user = get_userdata($uid);
        
            if(!empty($pid))
            {
                $post = get_post($pid);
                $subject = [COLOR=#ff0000]"RE: ".$post->post_title;[/COLOR]
            }
        
        
            if(isset($_POST['send']))
            {
                $subject = htmlspecialchars($_POST['subject']);
                $message = nl2br(htmlspecialchars($_POST['message']));
                $to = $_POST['to'];
                
                if(!empty($to))
                {
                    $uid = PricerrTheme_get_userid_from_username($to);    
                }

I'm not sure which part of code is called exactly, but it's definitely a piece of the code above. The part marked in RED is the subject of the private message for example.


Basically, what I have to do is add something to the second code I mentioned, and then change one of the first codes I mentioned. Because I want one Contact button to display this subject "$subject = "RE: ".$post->post_title;" and another to display for example "RE: ".New Message."


I'm sure someone with php knowledge can fix this quickly and easily. Hope someone can help. Thank you.
 
Guys. My website is a fiverr-clone. There's 50 gigs on it at the moment. If someone can help me with this, I will give you $10 in site credit to buy gigs on my site.
 
Hit me up on Skype: i_m_mrblue.

I'll can help you out, but it will be a lot easier if I can see exactly what you are trying to achieve.
 
Hit me up on Skype: i_m_mrblue.

I'll can help you out, but it will be a lot easier if I can see exactly what you are trying to achieve.

Okay, added you.
 
MrBlue is the man!

Fixed my problem in 3 minutes. Literally. And then I wanted to know what he did exactly, and he explained everything. Great help, great communication. I'd hire him if I could.

BlackHatWorld Wins Again! Fixing shit theme developers can't do on their own goddamn themes without taking a week and about 17 failed attempts! :pirate:
 
Back
Top