1. vB uses this code to redirect to any location (in our case page.php), how do I redirect to previous page that user accessed?
PHP Code:
$vbulletin->url = "page.php" . $vbulletin->session->vars['sessionurl'];
if (isset($_SERVER['QUERY_STRING'])) {
eval(print_standard_redirect('redirect_linkdir', true, true));}
I then found this:-
PHP Code:
require_once(DIR . '/includes/functions_login.php');
$vbulletin->url = fetch_replaced_session_url($vbulletin->url);
But it isn't working for me. How do I go a couple of pages back from history ?
2. How do I create online locations for my sub-pages like for do=this and do=that
3. After reading
Send PMs (automatically), it was easy to send PM's. Just have a few queries, what does
$pmdm->set_info('is_automated', true); AND
cache_permissions($fromuser, false); does ? coz I can't see any difference with/without them.
4. How do we use vbmail function in our page? I think there's something wrong in my code as I am getting very late mails OR not getting them at all. The other default mailing functions are working perfect i.e. I receive mails instantly when using contact us or any other email function but only not through my custom page.
PHP Code:
$emailto = "email@email.com";
$subject = "my email subject";
$message = "my message body";
vbmail($emailto, $subject, $message);