vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Profile Fields in Postbits (https://vborg.vbsupport.ru/showthread.php?t=108344)

Wired1 08-08-2006 01:08 PM

This is similar to my dropdown hack that I created before this one existed, in October 2005. Mine doesn't require an additional SQL table, although it does require another hack I did, as well as some manual editing.

redlabour 08-09-2006 12:30 PM

Quote:

Originally Posted by Wired1
This is similar to my dropdown hack that I created before this one existed, in October 2005. Mine doesn't require an additional SQL table, although it does require another hack I did, as well as some manual editing.

Link ?

And is this a Answer to get this work for 3.6 ? :cross-eyed:

nicedreams 08-09-2006 02:03 PM

Quote:

Originally Posted by nicedreams
I fixed it for 3.6.0. This is what I did:

PHP Code:

                $Query "select type, profilefieldid from ".TABLE_PREFIX."profilefield where profilefieldid=".substr($value5);
                
$row2=$GLOBALS['vbulletin']->db->query_first($Query);
 
                
$phrasefield "field".$row2[profilefieldid]."_title";
                
$wherephrase " varname LIKE '$phrasefield' LIMIT 1";
                
$Query2 "select text FROM phrase WHERE" $wherephrase;
                
$custom_titles=$GLOBALS['vbulletin']->db->query_first($Query2);

$this->post['posts']=$this->post['posts'].'</div><div><strong>' $custom_titles['text'] . ':</strong> '.$this->post[$value]; 

Changed the query line by dropping the title. Added the 4 lines to get the title of the custom field from the phrases.

Jimmy

Forgot to mention this is in the PB - Postbits plugin code under plugins.

redlabour 08-10-2006 05:09 AM

Sorry but i have to "search for" and "replace it with" in the *.xml ?

redlabour 08-10-2006 07:38 PM

Quote:

Originally Posted by nicedreams
Forgot to mention this is in the PB - Postbits plugin code under plugins.

Does not work :

Quote:

Datenbankfehler in vBulletin 3.6.0:

Invalid SQL:
select text FROM phrase WHERE varname LIKE 'field2_title' LIMIT 1;

MySQL-Fehler : Table 'usrdb_poltbofu.phrase' doesn't exist
Fehler-Nr. : 1146
Datum : Thursday, August 10th 2006 @ 10:38:07 PM
Skript : http://www.politikstube.de/forum/showthread.php?p=48675
Referrer : http://www.politikstube.de/forum/new...newthread&f=34
IP-Adresse : 88.130.109.124
Benutzername : redlabour
Klassenname : vb_database
Here is the edited code :

Quote:

<title>PB - Postbits</title>
<hookname>postbit_display_complete</hookname>

<phpcode>
$Query = "select data from ".TABLE_PREFIX."datastore where title='showinpostbit'";
$row=$GLOBALS['vbulletin']->db->query_first($Query);
$toshow=explode(',',$row['data']);
foreach($toshow as $value){
if($this->post[$value]!=''){
$Query = "select type, profilefieldid from ".TABLE_PREFIX."profilefield where profilefieldid=".substr($value, 5);
$row2=$GLOBALS['vbulletin']->db->query_first($Query);

$phrasefield = "field".$row2[profilefieldid]."_title";
$wherephrase = " varname LIKE '$phrasefield' LIMIT 1";
$Query2 = "select text FROM phrase WHERE" . $wherephrase;
$custom_titles=$GLOBALS['vbulletin']->db->query_first($Query2);

$this->post['posts']=$this->post['posts'].'</div><div><strong>' . $custom_titles['text'] . ':</strong> '.$this->post[$value];
}
}
$Query = "select data from ".TABLE_PREFIX."datastore where title='showunderus'";
$row=$GLOBALS['vbulletin']->db->query_first($Query);
$toshow=explode(',',$row['data']);
foreach($toshow as $value){
if($this->post[$value]!=''){
$Query = "select title from ".TABLE_PREFIX."profilefield where profilefieldid=".substr($value, 5);
$row2=$GLOBALS['vbulletin']->db->query_first($Query);
$this->post['rank']=$this->post['rank'].'</div><div class="smallfont">'.$row2[title].': '.$this->post[$value];
}
}
Did you forget the Tableprefix vb3_ ?

nicedreams 08-10-2006 08:06 PM

Quote:

Originally Posted by redlabour

Did you forget the Tableprefix vb3_ ?


I don't have a table prefix. But change the line to:

PHP Code:

$Query2 "select text FROM ".TABLE_PREFIX."phrase WHERE" $wherephrase


emin3m 08-10-2006 10:46 PM

thanks nicedreams,
added the 3.6.0 version here
https://vborg.vbsupport.ru/showthread.php?t=123619


All times are GMT. The time now is 01:59 PM.

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.01143 seconds
  • Memory Usage 1,747KB
  • 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
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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