vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [RELEASE] Location, Interests, etc. in post! (https://vborg.vbsupport.ru/showthread.php?t=1776)

07-17-2000 02:02 AM

Parker - don't replace that part, I didn't tell you to :)

Only replace what I said to replace there with what I told you to replace it with - no more, no less. If you follow the directions, you will still have the other PM related stuff there.

07-17-2000 04:29 PM

just thought i'd add

the location/interest hack works on my upgraded 1.1.3 beta 3 forum too :D

thanks Ed :D

07-20-2000 09:15 AM

Ed, can you add a third field into there for me? Let's say I want to add "occupation" to it, how would add that in addition to the other ones?

07-20-2000 02:32 PM

Code:

  if ($userid!=0) {
    //PM Hack
    //Original: $userinfo=$DB_site->query_first("SELECT userid,email,username,usertitle,signature,showemail,homepage,icq,aim,yahoo,joindate,posts FROM user WHERE userid=$userid");
    //New:
    $userinfo=$DB_site->query_first("SELECT userid,email,biography,username,usertitle,signature,showemail,homepage,icq,aim,yahoo,joindate,posts,receivepm FROM user WHERE userid=$userid");
    $bio = split("\n", trim($userinfo[biography]));
    $location = "";
    $interests = "";
    $occupation = "";
    while(list($key,$val)=each($bio)) {
            if (strlen(strpos($val, 'Location:'))) {
                    $location = eregi_replace("^Location:([^\\[]*)", "\\1", "$val");
        } elseif (strlen(strpos($val, 'Interests:'))) {
                $interests = eregi_replace("^Interests:([^\\[]*)", "\\1", "$val");
        } elseif (strlen(strpos($val, 'Occupation:'))) {
                $occupation = eregi_replace("^Occupation:([^\\[]*)", "\\1", "$val");
        }
    }
if ($location) { $location = "Location: $location"; }
if ($interests) { $interests = "Interests: $interests"; }
if ($occupation) { $occupation = "Occupation: $occupation"; }

[Edited by Ed Sullivan on 07-20-2000 at 11:34 AM]

07-31-2000 03:22 PM

okay... how does one reapply the location/interest hack in light of installing rangersfan's avatar hack at http://vbulletin.com/forum/showthread.php?threadid=2127 ?

07-31-2000 03:55 PM

Don't replace the $userinfo=$DB_site-> line, just add biography to where I told you to add if before. Then just add the rest of the code the same way.

07-31-2000 04:28 PM

Just add 'iconpath' along side 'biography.

07-31-2000 04:44 PM

do you mean add to showthread.php ? where ? in the below code ?
Quote:

if ($userid!=0) {
$userinfo=$DB_site->query_first("SELECT userid,email,username,biography,usertitle,signatur e,showemail,homepage,icq,aim,yahoo,joindate,posts FROM user WHERE userid=$userid");
$bio = split("\n", trim($userinfo[biography]));
$location = "";
$interests = "";
while(list($key,$val)=each($bio)) {
if (strlen(strpos($val, 'Location:'))) {
$location = eregi_replace("^Location:([^\\[]*)", "\\1", "$val");
} elseif (strlen(strpos($val, 'Interests:'))) {
$interests = eregi_replace("^Interests:([^\\[]*)", "\\1", "$val");
}
}
if ($location) { $location = "Location: $location"; }
if ($interests) { $interests = "Interests: $interests"; }

07-31-2000 04:56 PM

I don't really understand as you appear to have it working on your forum.

If you are trying to get the location back to working. Just add 'iconpath' in the following like this:

$userinfo=$DB_site->query_first("SELECT userid,email,username,biography,usertitle,signatur e,showemail,homepage,icq,aim,y ahoo,joindate,posts,iconpath

07-31-2000 05:47 PM

yeah i want to bring back location display...the thing is i have this already in showthreads

This is what i have:
[quote]if ($userid!=0) {
$userinfo=$DB_site->query_first("SELECT userid,email,username,usertitle,signature,showemai l,homepage,icq,aim,yahoo,joind ate,posts,iconpath FROM user WHERE userid=$userid");
$bio = split("\n", trim($userinfo[biography]));
$location = "";
$interests = "";
while(list($key,$val)=each($bio)) {
if (strlen(strpos($val, 'Location:'))) {
$location = eregi_replace("^Location:([^\\[]*)", "\\1", "$val");
} elseif (strlen(strpos($val, 'Interests:'))) {
$interests = eregi_replace("^Interests:([^\\[]*)", "\\1", "$val");
}
}
if ($location) { $location = "Location: $location"; }
if ($interests) { $interests = "Interests: $interests"; }[quote]


All times are GMT. The time now is 04:44 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.01220 seconds
  • Memory Usage 1,739KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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