The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[HTL] Addon: Auto-populate NavBar popup menu [for Erwin's Flash Player] Details »» | |||||||||||||||||||||||||||
[HTL] Addon: Auto-populate NavBar popup menu [for Erwin's Flash Player]
Developer Last Online: Apr 2022
Addon: Auto-populate NavBar popup menu [for Erwin's Flash Player]
Version: 1.2 vB-version: 3.0.0 Release Candidate 3 Developer: Natch Install difficulty: Easy-as File edits: 2 Template edits: 2 Description of the Hack: This takes all your Flash Games you have uploaded into the /forums/games/ folder, and parses them into an array, then creates a vB3 (so cool) drop-down menu, and populates that menu with nicely-labelled links to every one of your games (provided they have the extension .swf. HACK INSTALLATION DETAILS: Files modified for this Hack: global.php includes/functions.php Templates modified for this Hack: navbar NOTE: In attachment are both HTL and text instructions. Pop the HTL file and the XML file into your htlfiles folder (remember to ensure the htl file is uploaded as BINARY) and run it thru the HTL, or read the text file and DIY Enjoy! and props to Erwin for his great work ... UPDATE: 1.2 Upgraded to HTL format. UPDATE: 1.1 Added a script to format visible link names more neatly. RELEASE: 1.0 Initial vB.org release. Show Your Support
|
Comments |
#12
|
|||
|
|||
When I tried to load in the HTL version, I got a database error...
I went to "Install Hack" via the HTL, and chose the "Auto-Populate Navbar popup menu [for Erwin's Flash Player]" from the list. Then I hit the confirm button, and it wasn't happy. Any ideas? Code:
Database error in vBulletin 3.0.0 Release Candidate 3: Invalid SQL: INSERT INTO hacklog (hacklogid, hackid, modname, modtype, linenumber, changetype, userid, oldcode, newcode, dateline, lastmodified, notes) VALUES ('', 1, 'navbar', 1, 0, 1, 283, '<!-- / NAVBAR POPUP MENUS --> ', ' <if condition=\"$show[\'member\']\"> // remove this line and the endif if you wish all users and guests to view the menu <!-- flash player auto-menu --> <div class=\"vbmenu_popup\" id=\"flashplayer_menu\" style=\"display:none\"> <table cellpadding=\"4\" cellspacing=\"1\" border=\"0\"> <tr><td class=\"thead\">$vbphrase[flashplayer_title]</td></tr> $nav_flash </table> </div> <!-- / flash player auto-menu --> </if> ', 1075184306, 1075203260, ''), ('', 1, 'navbar', 1, 0, 1, 283, ' <if condition=\"$show[\'searchbuttons\']\"> <td class=\"vbmenu_control\"><a href=\"$vboptions[bburl]/search.php?$session[sessionurl]do=getnew\">$vbphrase[new_posts]</a></td> <td id=\"navbar_search\" class=\"vbmenu_control\"><a href=\"$vboptions[bburl]/search.php?$session[sessionurl]\">$vbphrase[search]</a> <script type=\"text/javascript\"> vbmenu_register(\"navbar_search\"); </script></td> </if> ', ' <if condition=\"$show[\'member\']\"> <td id=\"flashplayer\" class=\"vbmenu_control\"><a href=\"#flashplayer\">$vbphrase[flashplayer_title]</a> <script type=\"text/javascript\"> vbmenu_register(\"flashplayer\"); </script></td> </if> ', 1075184306, 1075203260, ''), ('', 1, 'includes/functions.php', 0, 0, 1, 283, '/*======================================================================*\\ || #################################################################### || # Downloaded: 20:02, Wed Jan 21st 2004 || # CVS: $RCSfile: functions.php,v $ - $Revision: 1.934 $ || #################################################################### \\*======================================================================*/ ?> ', 'function genFlashMenu($flashdir) { global $vboptions; $swfarray = getInstalledGames($flashdir); foreach ($swfarray as $filename) { $playvar = substr($filename, 0, strpos($filename,\".\")); $displayname = properCase($playvar); $flashmenu.= \"\\t\\t<tr><td class=\\\"vbmenu_option\\\"><a href=\\\"$vboptions[bburl]/flash.php?play=\".$playvar.\"\\\">$displayname</a></td></tr>\\n\"; } return $flashmenu; } function getInstalledGames($flashdir) { $dh = opendir( $flashdir ); while( false !== ($file = readdir( $dh ))) { // look for these file types.... if (eregi(\"(swf)$\",$file)) { $swfs[] = $file; } } return $swfs; } function properCase($text) { $firstLetter = substr($text,0,1); $rest = substr($text,1,strlen($text)); $spitout = strtoupper($firstLetter).$rest; return $spitout; } ', 1075184209, 1075203260, ''), ('', 1, 'global.php', 0, 0, 1, 283, '/*======================================================================*\\ || #################################################################### || # Downloaded: 20:02, Wed Jan 21st 2004 || # CVS: $RCSfile: global.php,v $ - $Revision: 1.240 $ || #################################################################### \\*======================================================================*/ ?> ', ' $flashdir = \'/full path to your/forums/games/\'; // alter this variable to match your forum setup $nav_flash = genFlashMenu($flashdir); ', 1075184209, 1075203260, '<span style=\'font-size:larger\'><b>NOTE</b>: you MUST alter the path variable <b>$flashdir</b> here to match your forum setup.</span>') mysql error: Unknown column 'changetype' in 'field list' mysql error number: 1054 Date: Tuesday 27th of January 2004 01:37:35 PM Script: http://*/hackadmin.php Referer: http://*/hackadmin.php Username: Atwookie IP Address: *.*.*.* |
#13
|
||||
|
||||
Well the error is referring to the hacklog table, saying
Code:
mysql error: Unknown column 'changetype' in 'field list' mysql error number: 1054 Q: had you removed all alterations from your manual install ? [and can you edit your post to use {php} or {code} tags - that would make sure this entry full of hack-modifications is displayed properly ...] |
#14
|
||||
|
||||
[QUOTE=CdaKnight]When I tried to load in the HTL version, I got a database error...
I went to "Install Hack" via the HTL, and chose the "Auto-Populate Navbar popup menu [for Erwin's Flash Player]" from the list. Then I hit the confirm button, and it wasn't happy. Any ideas? Quote:
|
#15
|
||||
|
||||
Quote:
the query says to insert these file/template modifications to hackid=1, but that one is reserved for the HTL itself... *so confused* *so scared that he had a major f*ckup in his script* :'((( |
#16
|
|||
|
|||
I don't have that column, although now I'm guessing I should... I used the installer... Is it possible to just drop 'hack' and 'hacklog' and run the installer to add them again (I'm assuming I wouldn't need the phrases, etc. again [including the file changes])
Kura, if you'd like to access my admincp, or need a copy of the files, please let me know what you need and I'll PM it to you. And I could have sworn I installed the upgrade... and I'll check again and make sure I did it correctly. I'm normally not this incompetent with this stuff... Oh, and PS: I never had a manual install. I chose to wait due to time constraints, and was very happy when you release the HTL version, saving me time. |
#17
|
||||
|
||||
Quote:
|
#18
|
||||
|
||||
Quote:
1) make sure you have the Hack_Tracking_Log.htl file in your htlfiles/ directory; 2) go to Manage Hacks -> Edit Hack Details for the Hack Tracking Log entry; 3) disable all steps for the Install Routine except Run Queries; 4) Save. Now go to Run Install Sequence (it's in the drop-down Controls menu) for the Hack Tracking Log; 5) Choose to run a Real Install, and click Proceed (or Continue?). You will now only encounter the Run Queries step. It will perform that step, which will clear out your hack and hacklog tables entirely!. 6) You will now have an empty HTL installation, which is baaaaad. So, we fix! Go to install hack, and choose the Hack Tracking Log that is listed there. Choose Import to Db only ! Hit proceed. 7) The HTL will now be imported to your system, but it will not appear as properly installed, but as Imported-only. To fix that, run this query on your database (manually): UPDATE hack SET atstep=-1 WHERE hackid=1; add a table prefix in front of "hack" if you have one. Then your HTL installation should be fully operational again, and have the column changetype. If not, your .htl file is corrupted somehow, outdated-beyond-all-outdatedness. Natch: pretty much, yeah... |
#19
|
|||
|
|||
I think I've done something horribly wrong. So I just dropped the hack log tables, redownloaded everything, and reinstalled. Works like a bute.
However, I have two problems with this actual hack now. :\ 1) The phrase you specify in your instructions is different that the one inserted into the phrase database. 2) The Javascript menu isn't coming up. I get the little arrow, however the title "Flash", and the titles of all the games come on top of my welcome DIV. |
#20
|
||||
|
||||
Quote:
If this is the case, then that would explain why your menu title ain't workin' What is the phrase title that is being inserted ? |
#21
|
|||
|
|||
It was just "flash_title" instead of "flash_addon_title". I was simply alerting you so that it can be remedied. I changed the phrase to match the one inserted by the install in the template, however the menu itself is not being created via the javascript.
Lemme post a screen of what's happening. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|