vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Few general vb coding queries (https://vborg.vbsupport.ru/showthread.php?t=188022)

veenuisthebest 08-24-2008 11:18 AM

14. Just curious to know, why has vb changed functions like mail to vbmail, date to vbdate and so on. What is the difference in the two?

15. By following this article, I was able to create online locations for my vbpage via plugins. I wanted to know, how do I make it so that it shows a different location for sub-pages as well.

Like, if a person is viewing page.php?do=edit , then it should display the correct location and not the location of page.php

Thank You

Marco van Herwaarden 08-24-2008 12:34 PM

14. To see the difference, have a look at these functions in the ./includes/functions.php file.

15. Make sure the usergroup of the user browsing the WOL has permission to view detailed locations.

veenuisthebest 08-25-2008 11:18 AM

14. Thank You.. It did helped me.

15. Ofcourse the permissions are all set to YES. See this is my code

Hook: online_location_process

PHP Code:

if ($filename == 'page.php')
{
        
$userinfo['activity'] = 'Viewing Page';
}
if (
$filename == 'page.php?do=edit')
{
        
$userinfo['activity'] = 'Editing Page';


Hook: online_location_unknown

PHP Code:

if ($userinfo['activity'] == 'Viewing Page')
{
        
$userinfo['action'] = 'Viewing Page';
        
$handled true;
}
if (
$userinfo['activity'] == 'Editing Page')
{
        
$userinfo['action'] = 'Editing Page';
        
$handled true;



Now... my problem is that even on viewing page.php?do=edit , it shows "Viewing Page" INSTEAD OF "Editing Page" at whos online !

Thank You

Opserty 08-25-2008 11:45 AM

How about:
PHP Code:

if ($filename == 'page.php' AND $_REQUEST['do'] == 'edit')
{
        
$userinfo['activity'] = 'Editing Page';
}  
elseif (
$filename == 'page.php')
{
        
$userinfo['activity'] = 'Viewing Page';



veenuisthebest 08-25-2008 12:36 PM

I had put the above code in online_location_process hook but its still showing "Viewing Page" for page.php?do=edit

by the way, can the reason be that my actual subpage is page.php?do=edit&uid=$row_id

Any other way pleasee.. ?

veenuisthebest 08-27-2008 09:48 AM

11. 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'truetrue));} 

15. How do I create online locations for my sub-pages. Solution in post #14 doesn't work for me.

16. 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.

veenuisthebest 08-30-2008 02:06 PM

One more plz:-

17. 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$messagefalse$vbulletin->options['webmasteremail'], ''$row_name); 


veenuisthebest 09-02-2008 06:36 AM

anyone ??


All times are GMT. The time now is 02:31 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02053 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete