Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives

Reply
 
Thread Tools
Please read if you know ANYTHING about hacking vB! Details »»
Please read if you know ANYTHING about hacking vB!
Version: , by Sean Sean is offline
Developer Last Online: Nov 2002 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 07-05-2002 Last Update: Never Installs: 0
 
No support by the author.

Ok, i got custom testboxes to load entries into the thread table. its there! But, now what file do I need to edit to load that variable into my postbit template (showthread.php)? I tried $post[variable] but that didn't work? Am I using the wrong variable? or is there a file I need to edit? If I need to edti a file, which one?

Thanks!!
-Sean

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 07-06-2002, 08:11 PM
Sean's Avatar
Sean Sean is offline
 
Join Date: Nov 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone?? I leave tomorrow, so some help today would be great...
Reply With Quote
  #13  
Old 07-06-2002, 09:07 PM
Sean's Avatar
Sean Sean is offline
 
Join Date: Nov 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have tried EVERYTHING.

I have added queries here and there, nothing. moved that query everywhere, nothing... Someone help?? :-\
Reply With Quote
  #14  
Old 07-25-2002, 05:16 PM
Sean's Avatar
Sean Sean is offline
 
Join Date: Nov 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone out there help me out?

Still gotten no where. (Of course, I was gone from the 7th til' the 21st. )

Someone HAS to know!
Reply With Quote
  #15  
Old 07-27-2002, 10:59 PM
Sean's Avatar
Sean Sean is offline
 
Join Date: Nov 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Come on... Someone please help me.. :-\
Reply With Quote
  #16  
Old 07-29-2002, 11:20 PM
Sean's Avatar
Sean Sean is offline
 
Join Date: Nov 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please help!
Reply With Quote
  #17  
Old 07-30-2002, 08:51 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your message lacks many crucial details:

1- Have you managed to update these new fields you created inside vb? ie. are vb writing your custom variables user entered to your custom db fields when a new post is made? First check that out via PHPmyAdmin, to make sure custom fields are populated.

2- If they are populated what are these fields? In other words, what new fields have you created in which tables? (thread? post? both? which do you populate?)

3- What code are you trying to apply and fail in showthread.php? Where do you insert it in the file? Have your traced the problem by debugging? put some "echo variablename"s around to see if vb can read data from these fields successfully or not..

4- If vb can read data from the new fields, have you made template modifications so that they are displayed in thread view?

It is really impossible for someone to help you without knowing these details (unless he codes the script for you from the ground)..
Reply With Quote
  #18  
Old 07-30-2002, 05:24 PM
Sean's Avatar
Sean Sean is offline
 
Join Date: Nov 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for your reply, I'll answer to the best i can.

1 & 2. Yes, the fields (named: MAKER, MAKER_MAIL, and MODEL_DL) are populated. I still have to edit the post edit page, but that'seast important. The fields are created at the end of BOTh "POST" and "TABLE" and are both populated when a new post is made.

3. I tried to apply a simple mysql query, and echo'ed right below it, no go. I tried this code in MANY different places in showthread.php, and none worked. Is there a certain place that will?

4. Still haven't gotten the variables to show up on ANY page, always nothing.

Hope that helps some. If you want the exact code I put in the files, I can try to remake, as I don't have it any longer.

thanks
Reply With Quote
  #19  
Old 07-31-2002, 08:17 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First of all, IMO it's not a good idea to create these custom fields in BOTH tables. If these fields are thread related (unique in thread), create them in thread table, if they are message related (unique in a message but can be many in a thread) create them in post table.

If it is in thread table and you want to get it from there, you need to edit queries in showthread.php which gets data from thread table. You need to add these custom fields to SELECT queries so that they are got from db too. Here is an example:

$thread=$DB_site->query_first("SELECT threadid FROM thread WHERE forumid IN (0$forumslist) AND visible=1 AND (sticky=1 OR sticky=0) AND lastpost>='".($foruminfo[lastpost]-30)."' AND open<>10 ORDER BY lastpost DESC LIMIT 1");

should be:

$thread=$DB_site->query_first("SELECT threadid, custom1, custom2 FROM thread WHERE forumid IN (0$forumslist) AND visible=1 AND (sticky=1 OR sticky=0) AND lastpost>='".($foruminfo[lastpost]-30)."' AND open<>10 ORDER BY lastpost DESC LIMIT 1");

Now you can use this fields as:
$thread['custom1']
$thread['custom2']

Remember 2 important points:
1- there is not 1 query to change in showthread.php. This file have different queries for different actions, like: when user wants to read the last post, when he wants to read the newest post etc.. You have to go through entire file and modify all relevant SELECT commands that query thread table.

2- After you modify it, use "echo $thread['custom2'];" after the line you changed to make sure, query gets you data correctly. If it does, you can use it in showthread.php. But if you want to use it in postbit, postbit tempalte is parsed inside in admin/functions.php file inside "function getpostbit" and to use your new variables in that function, dont forget to add their name to the global list of the function..

Hope this helps.. :glasses:
Reply With Quote
  #20  
Old 08-02-2002, 12:23 AM
Sean's Avatar
Sean Sean is offline
 
Join Date: Nov 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, I will try that out right now!

I will also keep the new fields in the thread table only, because they are unqieu to JUST the thread.

Thanks again!
Reply With Quote
  #21  
Old 08-02-2002, 12:49 AM
Sean's Avatar
Sean Sean is offline
 
Join Date: Nov 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, it works! Now, the part I don't understand. How do I get all this into postbit? I looked in function getpostbit, but I don't know where to start. :-\

I did put this in, is that what you meant by adding it to the global's list?
Code:
function getpostbit($post,$templatename) { 
// sorts through all the stuff to return the postbit template

	// user
	global $bbuserinfo,$session,$ignore,$cookietimeout;
	// showthread
	global $counter,$firstnew,$sigcache,$highlight,$postid,$forum,$maker,$maker_mail,$model_dl;
	// global options
	global $showdeficon,$displayemails,$enablepms,$allowsignatures,$wordwrap,$dateformat,$timeformat,$logip,$replacewords,$postsperday,$avatarenabled,$registereddateformat,$viewattachedimages;
The threee variables are maker, maker_mail, and model_dl. All they need to do is show up in my first post of a thread. I already have a working hack that makes the first post of threads in a certain table its own template, which works fine. Basically, i need the ability to use them in "postbit."

What exactly do I change/add in the function to get maker, maker_mail, and Model_dl available in the "postbit" template?

Thanks!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:19 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.04684 seconds
  • Memory Usage 2,301KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete