The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
thanks alot !!
--------------- Added [DATE]1258717639[/DATE] at [TIME]1258717639[/TIME] --------------- in newreply.php (i think this is the file i need to edit) they have the part : PHP Code:
--------------- Added [DATE]1258719365[/DATE] at [TIME]1258719365[/TIME] --------------- |
#12
|
||||
|
||||
No, those are templates. You should try an actual search through the templates for $validfields and you would find it. The thread one is in class_dm_threadpost.php in the datamanager. The next hook after the fields are defined is threaddata_start, as I said before, and so you can plugin to there and add to the array.
|
#13
|
|||
|
|||
ok ive looked in the file u mentioned ("class_dm_threadpost.php") and ive there three classes that have this $validfields array .
i have added in the following textbox in the template "newreply" : Code:
<td><input type="text" class="bginput" name="bookname" value="$bookname" size="20" maxlength="$vboptions[titlemaxchars]" tabindex="1" title="$vbphrase[optional]" /></td> <td> </td> <td><img id="display_posticon" src="$selectedicon[src]" alt="$selectedicon[alt]" /></td> <td><input type="text" class="bginput" name="pagenumber" value="$pagenumber" size="20" maxlength="$vboptions[titlemaxchars]" tabindex="1" title="$vbphrase[optional]" /></td> <td> </td> <td><img id="display_posticon" src="$selectedicon[src]" alt="$selectedicon[alt]" /></td> <td><input type="text" class="bginput" name="exnumber" value="$exnumber" size="20" maxlength="$vboptions[titlemaxchars]" tabindex="1" title="$vbphrase[optional]" /></td> <td> </td> <td><img id="display_posticon" src="$selectedicon[src]" alt="$selectedicon[alt]" /></td> PHP Code:
and then what? where they will be available? sry im so annoying about this.. but belive me im reading alot about these datamanager and still havent understood how the all proccess goes . ill be glad if u could more specific. in addition, where shall i look for more "$validfields", in what templates? not through the admin cp right ? cause there i found nothing . and so, i didnt understand what shall i do with the : threaddata_start . the code i found about this hook is : Code:
function vB_DataManager_Thread(&$registry, $errtype = ERRTYPE_STANDARD) { parent::vB_DataManager_ThreadPost($registry, $errtype); ($hook = vBulletinHook::fetch_hook('threaddata_start')) ? eval($hook) : false; } regards, |
#14
|
||||
|
||||
When you add them to the validfields array, you may then use the datamanager to 'set' them prior to saving them. So, in threaddata_start, you add them:
PHP Code:
PHP Code:
PHP Code:
|
#15
|
|||
|
|||
yes i did that and also looked in "product-thread_thumbnails_v2" which adds another parameter to the thread(picture) and searched for "validfields" but found nothing.
in the file class_dm_threadpost.php there is three functions which using the validfields array, i need to add fields just to the class vB_DataManager_Post or to all of them ? "in threaddata_start, you add them" where is the threaddata_start ? in the function i posted above ? and i have no plugin, what does it mean in my plugin ? in what file ? newreply.php ? isnt some guides for this ? i read alot at the articles but still cant figure out... |
#16
|
||||
|
||||
You might want to read this section in the manual - Plugin System
|
#17
|
|||
|
|||
ok im reading this, can u please answer my questions ?
--------------- Added [DATE]1258745069[/DATE] at [TIME]1258745069[/TIME] --------------- ok so i understood i need to do add a plugin and there to choose the threaddata_start hook and there to write the code u said before, and which product i need to choose ? |
#18
|
||||
|
||||
You need to create your own product as that is what you are doing.
|
#19
|
|||
|
|||
ok so let me get it straight :
i go to default style choosing the newreply template, there ive added three textbox next to the title by the code : Code:
<td><input type="text" class="bginput" name="bookname" value="$bookname" size="20" maxlength="$vboptions[titlemaxchars]" tabindex="1" title="$vbphrase[optional]" /></td> <td> </td> <td><img id="display_posticon" src="$selectedicon[src]" alt="$selectedicon[alt]" /></td> <td><input type="text" class="bginput" name="pagenumber" value="$pagenumber" size="20" maxlength="$vboptions[titlemaxchars]" tabindex="1" title="$vbphrase[optional]" /></td> <td> </td> <td><img id="display_posticon" src="$selectedicon[src]" alt="$selectedicon[alt]" /></td> <td><input type="text" class="bginput" name="exnumber" value="$exnumber" size="20" maxlength="$vboptions[titlemaxchars]" tabindex="1" title="$vbphrase[optional]" /></td> <td> </td> <td><img id="display_posticon" src="$selectedicon[src]" alt="$selectedicon[alt]" /></td> PHP Code:
then creating a plugin, on the plugin choosing the product i just made and in the hook i choose "threaddata_start" . in the Plugin PHP Code i write : PHP Code:
PHP Code:
PHP Code:
and please refer to every step here im rly trying.. and sure that not all is right . regards, |
#20
|
||||
|
||||
You do not need to edit the file class_dm_threadpost.php to add those validfields if you created the plugin at threaddata_start to add the three fields (by replacing "whatever" with the name of the field, of course).
And you would not save the field using that same plugin. You need to pick a more appropriate hook location which is why I suggested looking at other modifications to see which hook locations they were using. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|