- Mar 22, 2013
- 9,153
- 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:
And the code above calls this code, which is in functions.php:
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.
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.