Log in

View Full Version : DB Installer


Pseudomizer
04-07-2005, 12:45 PM
Hello guys,

I have released some hacks already and the feedback was quite positive so far. Now i reached a state where many people are requesting ACP options and not modifying config files via PHP. They want to have all this in the ACP.

This can be coded but an installer would be nice. I searched for a "How-to-Create-Installer" or something similiar and I didn't find anything yet. Are there any people who can help me here to develop an installer which creates the corresponding database entries and templates in all styles?

Any help would be appreciated.

Cheers,

Marco van Herwaarden
04-07-2005, 01:44 PM
You could start with HIS by Link14716: https://vborg.vbsupport.ru/showthread.php?t=71542&highlight=hack+installer+system

deathemperor
04-07-2005, 02:52 PM
Hello guys,

I have released some hacks already and the feedback was quite positive so far. Now i reached a state where many people are requesting ACP options and not modifying config files via PHP. They want to have all this in the ACP.

This can be coded but an installer would be nice. I searched for a "How-to-Create-Installer" or something similiar and I didn't find anything yet. Are there any people who can help me here to develop an installer which creates the corresponding database entries and templates in all styles?

Any help would be appreciated.

Cheers,
https://vborg.vbsupport.ru/showthread.php?t=76297

Pseudomizer
04-07-2005, 11:30 PM
You could start with HIS by Link14716: https://vborg.vbsupport.ru/showthread.php?t=71542&highlight=hack+installer+system

Thank you Marco. I tried to use this HIS system but I ran into the same problem like sabret00the. As soon as I try to generate the sample files of the sample hack I get these database errors.

In addition to this there is 0 documentation.

I will try to use the second link from deathemperor which is very good. He answered my second question. But now I am just missing one thing. How do I add templates into all styles with my installer? Any ideas?

Thanks for the feedback so far.

Cheers,

Pseudomizer

deathemperor
04-08-2005, 01:17 AM
I use this:

function template_insert($name, $content)
{
global $DB_site;
$template = compile_template($content);
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "template (templateid, title, template, template_un, styleid, templatetype, dateline, username, version) VALUES (NULL, '$name', '" . addslashes($template) . "', '" . addslashes($content) ."', '-1', 'template', '" . time() . "', 'USERNAME', '3.0.7')");
}

-1 mean the default style I think but I didn't test for all style, maybe you should query all styleid and then use a while loop for that function.

Pseudomizer
04-08-2005, 01:22 AM
I use this:

function template_insert($name, $content)
{
global $DB_site;
$template = compile_template($content);
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "template (templateid, title, template, template_un, styleid, templatetype, dateline, username, version) VALUES (NULL, '$name', '" . addslashes($template) . "', '" . addslashes($content) ."', '-1', 'template', '" . time() . "', 'USERNAME', '3.0.7')");
}

-1 mean the default style I think but I didn't test for all style, maybe you should query all styleid and then use a while loop for that function.

Hello deathemperor,

Thank you very much. But does it makes sense to place my new templates in all styles? I was thinking of doing that because the most common problem that people are posting is:

"I get a blank white page. Your hack doesn't work."

And you can read this in 90% of the hack threads. If I would install my templates in all styles, I would eliminate one possible error cause.

Do you agree with me?

Cheers,

Pseudomizer

deathemperor
04-08-2005, 03:23 AM
why don't you make an option then ?

Pseudomizer
04-10-2005, 03:16 PM
Hello deathemperor,

my latest script is working fine so far. Now I am running into the problem that my new created templates a visible in all styles but they are listed in the main listing without being in a category. Do you know how I can create a template category "mycategory" and place all my templates into this category?

Any help would be appreciated.

Cheers,

I've got it.

https://vborg.vbsupport.ru/showthread.php?t=63519

Cheers,

deathemperor
04-10-2005, 06:14 PM
Hello deathemperor,

my latest script is working fine so far. Now I am running into the problem that my new created templates a visible in all styles but they are listed in the main listing without being in a category. Do you know how I can create a template category "mycategory" and place all my templates into this category?

Any help would be appreciated.

Cheers,
oops, how come I didn't see this ?

well I knew this way, someone posted it in the modifications hints already so I don't want to repeat. I didn't think it's a hack that have 60 installs +_+

Pseudomizer
04-13-2005, 04:00 AM
Hello,

I am 95% finished with my new hack. Thanks for the help so far. I have one problem left.

When I install the phrases as global phrases they are installed BUT they have no default language. When I browse through the phrases I can see my new phrases and they are effective BUT my question is:

Do I have to define the default language? Is it automatically detected?

Should I offer an option during the installation to choose the language? I assume no because my phrases will be installed as the default templates. But I want to offer the german and the english translation via my phrases.

The best solution would be that both are installed and due to the board setting of the language the appropriate language should be used.

Any idea how I should do this?

Thanks in advance.

Cheers,

deathemperor
04-13-2005, 09:06 AM
Well I'm sorry I can't help you with this since my hacks so far weren't fully-phrased.