PDA

View Full Version : How To: Manual Install with the HIS


trafix
02-08-2005, 10:00 PM
Yes i know the title sounds confusing but in my release threads i have a few replies for ppl wanting manual install instructions instead of using the HIS.... so here it is :)

STEP 1 - QUERIES

The HIS installs the queries second last, however for manul instilation we have to do them first.
Open install/hachs/xxxxx/x/queries.php

this is how each querie is coded in this file

$query['new'][] = 'CREATE TABLE '. TABLE_PREFIX .'vb_jukebox_trax (
`songid` smallint(5) unsigned NOT NULL auto_increment,
`title` varchar(100) NOT NULL default \'\',
`url` varchar(100) NOT NULL default \'\',
`plays` smallint(5) default \'0\',
`active` int(2) NOT NULL default \'0\',
`userid` int(11) NOT NULL default \'0\',
`username` varchar(225) NOT NULL default \'\',
`rated_qty` int(5) NOT NULL default \'0\',
`rating` int(5) NOT NULL default \'0\',
`announce` int(2) NOT NULL default \'0\',
`genre` varchar(50) NOT NULL default \'\',
PRIMARY KEY (`songid`))';

To extract the querie remove "$query['new'][] = '" from the start and ")';" from the end and run the querie in the admincp


CREATE TABLE '. TABLE_PREFIX .'vb_jukebox_trax (
`songid` smallint(5) unsigned NOT NULL auto_increment,
`title` varchar(100) NOT NULL default \'\',
`url` varchar(100) NOT NULL default \'\',
`plays` smallint(5) default \'0\',
`active` int(2) NOT NULL default \'0\',
`userid` int(11) NOT NULL default \'0\',
`username` varchar(225) NOT NULL default \'\',
`rated_qty` int(5) NOT NULL default \'0\',
`rating` int(5) NOT NULL default \'0\',
`announce` int(2) NOT NULL default \'0\',
`genre` varchar(50) NOT NULL default \'\',
PRIMARY KEY (`songid`)

Repeat for each one

STEP 2 - TEMPLATES
Open install/hachs/xxxxx/x/templates.php

this is how each template is coded in this file

$templates['jb_jukebox_bit'] = '<tr>
<td align="center" $backcolor>
$rateimage
</td>
<td align="left" $backcolor>
<a href="vb_jukebox.php?$session[sessionurl]do=main&mysong=$songlist[songid]">$songlist[title]</a>
</td>
<td align="center" $backcolor>
$mediatype
</td>
<td align="center" $backcolor>
$songlist[username]
</td>
<td align="center" $backcolor>
$songlist[plays]
</td>
</tr>';

Remove "$templates['jb_jukebox_bit'] = '" and "';"
and add a new template with the name 'jb_jukebox_bit'

<tr>
<td align="center" $backcolor>
$rateimage
</td>
<td align="left" $backcolor>
<a href="vb_jukebox.php?$session[sessionurl]do=main&mysong=$songlist[songid]">$songlist[title]</a>
</td>
<td align="center" $backcolor>
$mediatype
</td>
<td align="center" $backcolor>
$songlist[username]
</td>
<td align="center" $backcolor>
$songlist[plays]
</td>
</tr>

Repeat for each

STEP 3 - PHRASES

Open install/hachs/xxxxx/x/phrases.php

this is how each phrase is coded in this file

$phrase['jb_is_active']['text'] = 'Is this song active..';
$phrase['jb_is_active']['phrasetypeid'] = '888';


If you performed step 1 properly and the hack requires its own phrasegroup .. this will now show in your phrase manager list

However this is quite self explanatory here but ... find the right phrasegroup and add a phrase, in the example phrasegroup id 888 is required so add this phrase under the hacks own phrasegroup using the ['text'] for each.

How do I find out what the name of phrasegroup X is?

When you view a list of each phrasegroup you will see in the following in the header for each .. like

GLOBAL Phrases (phrasetypeid = 1)
Control Panel Global Phrases (phrasetypeid = 2)
Permissions Phrases (phrasetypeid = 3)
Forum-Related Phrases (phrasetypeid = 4)
Calendar Phrases (phrasetypeid = 5)

Repeat for each

STEP 4 - SETTINGS

Open install/hachs/xxxxx/x/settings.php

this is how each settings is coded in this file

$setting['jb_defult_title']['titlephrase'] = 'Defult Song Title';
$setting['jb_defult_title']['descphrase'] = 'What is the name of the song?';
$setting['jb_defult_title']['grouptitle'] = 'jukebox';
$setting['jb_defult_title']['value'] = 'vB Jukebox';
$setting['jb_defult_title']['defaultvalue'] = 'vB Jukebox';
$setting['jb_defult_title']['optioncode'] = '';
$setting['jb_defult_title']['displayorder'] = '20';

This one is a little more difficult and has to be done in 2 steps.

STEP 4.1 - Phrases
Open your phrase manager again and add to the vBulletin Settings Phrases (phrasetypeid = 5000) and there are 2 phrases entered for each one. Please note the varname includes the vboption name with the pre and post text

FROM $setting['jb_defult_title']['titlephrase'] = 'Defult Song Title';

varname = setting_jb_defult_title_title
Text = Defult Song Title

FROM $setting['jb_defult_title']['descphrase'] = 'What is the name of the song?';

varname = setting_jb_defult_title_desc
Text = What is the name of the song?

Repete for each

STEP 4.2 - Add settings to database

again there is a couple of ways to do this

STEP 4.2.1
Open phpmyadmin and select the "setting" table and then select insert
enter the following based in the example above

varname = jb_defult_title
grouptitle = jukebox
value = vB Jukebox
defaultvalue = vB Jukebox
optioncode =
displayorder = 20
advanced = 0
volatile = 0

Repete for each

STEP 4.2.2
You could build a quirie for each and enter them via the admincp

STEP 4.2.3
Fo your forum is in debug mode this will allow you to add settings on the fly in your admincp settings area.

STEP 5 - TEMPLATES & FILE EDITS
I always influde all template and file mods in the readme file

Open install/hachs/xxxxx/x/file_mods.php
and
Open install/hachs/xxxxx/x/template_mods.php

this is how each is coded in this file

$temp_mod['Navigation / Breadcrumb Templates ?: navbar'][$i]['note'] = '[If you have modifyed this template before you may like to edit this in your own way. all we need to do it provide a link to vb_jukebox.php and target it to a new browser window.
Otherwise you can follow the instructions to add a link to the quick links drop down menu under a new category called "Fun Links". Please note that i have not used phrases here, please edit as required or add you can add your phrases to the GLOBAL phrasegroup.
If you choose to edit as below you can add more links to other fun hacks here in the future :) ]'; // So does this.
$temp_mod['Navigation / Breadcrumb Templates ?: navbar'][$i]['find'] = '<td class="vbmenu_option"><a href="online.php?$session[sessionurl]">$vbphrase[whos_online]</a></td></tr>';
$temp_mod['Navigation / Breadcrumb Templates ?: navbar'][$i]['type'] = "Add Under";
$temp_mod['Navigation / Breadcrumb Templates ?: navbar'][$i]['mod'] = '<tr><td class="thead">Fun Links</td></tr>
<tr><td class="vbmenu_option"><a href="vb_jukebox.php?$session[sessionurl]" target="_blank">vB Jukebox</a></td></tr>';


$temp_mod['Navigation / Breadcrumb Templates ?: navbar'] = This tell you the name of the file ot template that has to be edited.

['note'] = Just a note of what is being done with this edit
['find'] = text to look for in the current file/template
['type'] = what to do
['mod'] = the test that has to be added