The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Please read if you know ANYTHING about hacking vB! Details »» | |||||||||||||||||||||||||||
Please read if you know ANYTHING about hacking vB!
Developer Last Online: Nov 2002
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
|
Comments |
#12
|
||||
|
||||
Anyone?? I leave tomorrow, so some help today would be great...
|
#13
|
||||
|
||||
I have tried EVERYTHING.
I have added queries here and there, nothing. moved that query everywhere, nothing... Someone help?? :-\ |
#14
|
||||
|
||||
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! |
#15
|
||||
|
||||
Come on... Someone please help me.. :-\
|
#16
|
||||
|
||||
Please help!
|
#17
|
||||
|
||||
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).. |
#18
|
||||
|
||||
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 |
#19
|
||||
|
||||
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: |
#20
|
||||
|
||||
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! |
#21
|
||||
|
||||
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; What exactly do I change/add in the function to get maker, maker_mail, and Model_dl available in the "postbit" template? Thanks! |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|