The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Adding an album type?
Right now there are three album types, Public, Private and Profile. How would one go about adding a fourth option?
My final goal is to create an option for Webcomics and then display the latest image uploaded on an extra tab in the profile but I believe this would be where I need to start. |
#2
|
||||
|
||||
Ok, well I added the option in the SQL (added webcomic as an option in the state row of the album table) and figured out how to add it to the album_edit template by doing the following.
Find: HTML Code:
<div><label for="rb_albumtype_public"><input type="radio" name="albumtype" value="public" id="rb_albumtype_public" $formdata[albumtype_public] />$vbphrase[public]</label></div> HTML Code:
<!-- START WEBCOMIC OPTION --> <div><label for="rb_albumtype_webcomic"><input type="radio" name="albumtype" value="webcomic" id="rb_albumtype_webcomic" $formdata[albumtype_webcomic] />$vbphrase[webcomic]</label></div> <!-- END WEBCOMIC OPTION --> Actually figuring out the php needed to update the SQL with the webcomic option seems to be kicking my butt though. I tried adding a plugin at the hook album_album_update with the following code, although it was a total shot in the dark as I really don't have much of an idea as to what I'm doing and this is just edited code from the album.php file where I found code on updating an album. PHP Code:
--------------- Added [DATE]1263103168[/DATE] at [TIME]1263103168[/TIME] --------------- Just tried changing the plugin to use the hook album_album_edit and changed the code to the following: PHP Code:
|
#3
|
||||
|
||||
No one has any idea how I can get this option to save when a user selects it? I feel like I'm at that point where I'm so close but still so far away.
--------------- Added [DATE]1263269702[/DATE] at [TIME]1263269702[/TIME] --------------- Well I figured that maybe this in the hook albumdata_presave, which I thought would work.... PHP Code:
Quote:
Then I figured that maybe the code wasn't getting inserted before the code: PHP Code:
|
#4
|
||||
|
||||
bump
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|