PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2005-04-24 20:02:31

gizzmo
Member
From: Earth, Milkyway Galaxy
Registered: 2004-08-05
Posts: 252

bug in style system

got this when i tryed to delete a style.

File: /home/httpd/vhosts/punres.net/httpdocs/manage/styles/delete.php
Line: 25

PunBB reported: Unable to fetch style

Database reported: Unknown table 'styles' in where clause (Errno: 1109)

oh and there is no style for the this page.
http://punres.net/manage/styles/files.php?sid=2


and there didnt seem to be any redirect page after i uploaded the files, the css and the img


Gizzmo

Offline

 

#2 2005-04-24 20:06:14

gizzmo
Member
From: Earth, Milkyway Galaxy
Registered: 2004-08-05
Posts: 252

Re: bug in style system

oh and the download for the .tar files dont work eather


Gizzmo

Offline

 

#3 2005-04-24 20:55:08

Jansson
Former Administrator
From: Sweden
Registered: 2005-04-24
Posts: 431
Website

Re: bug in style system

I have fixed the errors now. It was all because I had used som PHP 5 only functions and the webserver use PHP 4. Should be fine now and I fixed the tar packages.

Can you check if the delete problem is still there?


// Jansson

PunRes developer | Blog
Winbas Affärssystem

Offline

 

#4 2005-04-24 21:39:14

Azakur4
New member
Registered: 2004-09-22
Posts: 6

Re: bug in style system

i have this problem when i want install a style

Code:

Fatal error: Call to undefined function: file_put_contents() in C:\AppServ\www\Foros\plugins\AP_Style_installer.php on line 67

Offline

 

#5 2005-04-24 21:55:20

Jansson
Former Administrator
From: Sweden
Registered: 2005-04-24
Posts: 431
Website

Re: bug in style system

Azakur4 wrote:

i have this problem when i want install a style

Code:

Fatal error: Call to undefined function: file_put_contents() in C:\AppServ\www\Foros\plugins\AP_Style_installer.php on line 67

I've updated the installer now. Download it again and it should work.


// Jansson

PunRes developer | Blog
Winbas Affärssystem

Offline

 

#6 2005-04-24 22:01:22

Azakur4
New member
Registered: 2004-09-22
Posts: 6

Re: bug in style system

work well, but i have this problem when i try logout to the forum

Notice: Undefined variable: tpl_redir in C:\AppServ\www\Foros\include\functions.php on line 875

i solved this problem:

in the tutorial for install the plugin say this in include/functions.php

#
#---------[ 7. FIND (line: 843) ]---------------------------------------------
#

    // Load the redirect template
    $tpl_redir = trim(file_get_contents(PUN_ROOT.'include/template/redirect.tpl'));


#
#---------[ 8. REPLACE WITH ]------------------------------------------------
#

    global $style;
    if(is_file(PUN_ROOT.'include/template/'.$style.'/redirect.tpl'))
        $tpl_maint = trim(file_get_contents(PUN_ROOT.'include/template/'.$style.'/redirect.tpl'));
    else
        $tpl_manit = trim(file_get_contents(PUN_ROOT.'include/template/redirect.tpl'));


the problem is in the replace not is "tpl_maint" is a "tpl_redir" change this and all work well.

Last edited by Azakur4 (2005-04-24 22:13:25)

Offline

 

#7 2005-04-24 22:16:04

Jansson
Former Administrator
From: Sweden
Registered: 2005-04-24
Posts: 431
Website

Re: bug in style system

Open functions.php

Find (line: 843):

    global $style;
    if(is_file(PUN_ROOT.'include/template/'.$style.'/maintenance.tpl'))
        $tpl_maint = trim(file_get_contents(PUN_ROOT.'include/template/'.$style.'/maintenance.tpl'));
    else
        $tpl_maint = trim(file_get_contents(PUN_ROOT.'include/template/maintenance.tpl'));


Replace with:

    // Load the redirect template
    global $style;
    if(is_file(PUN_ROOT.'include/template/'.$style.'/redirect.tpl'))
        $tpl_redir = trim(file_get_contents(PUN_ROOT.'include/template/'.$style.'/redirect.tpl'));
    else
        $tpl_redir = trim(file_get_contents(PUN_ROOT.'include/template/redirect.tpl'));


I've update Style installer with these changes


// Jansson

PunRes developer | Blog
Winbas Affärssystem

Offline

 

#8 2005-04-26 01:12:52

erissiva
Member
Registered: 2005-02-25
Posts: 154

Re: bug in style system

One problem  - After submitting a style, I get a blank page called "style.php" so I have to hit back to go back. It submits the style correctly, I was just wondering why it does this.

Is this just my browser?

Offline

 

#9 2005-04-26 03:38:45

gizzmo
Member
From: Earth, Milkyway Galaxy
Registered: 2004-08-05
Posts: 252

Re: bug in style system

its like there is no redirect right? i got the same thing.


Gizzmo

Offline

 

#10 2005-04-26 13:07:33

Jansson
Former Administrator
From: Sweden
Registered: 2005-04-24
Posts: 431
Website

Re: bug in style system

erissiva wrote:

One problem  - After submitting a style, I get a blank page called "style.php" so I have to hit back to go back. It submits the style correctly, I was just wondering why it does this.

Is this just my browser?

gizzmo wrote:

its like there is no redirect right? i got the same thing.

That bug was the same that caused the problem with there being no .tar package. Which was fixed shortly after you two posted your styles (sunday). Next time you'll post a style it will work.


// Jansson

PunRes developer | Blog
Winbas Affärssystem

Offline

 

#11 2005-04-26 14:19:49

gizzmo
Member
From: Earth, Milkyway Galaxy
Registered: 2004-08-05
Posts: 252

Re: bug in style system

good to know


Gizzmo

Offline

 

#12 2005-04-26 17:43:33

erissiva
Member
Registered: 2005-02-25
Posts: 154

Re: bug in style system

Goot.

Nice work! Love the system. wink

Offline

 

#13 2005-04-26 17:47:17

erissiva
Member
Registered: 2005-02-25
Posts: 154

Re: bug in style system

Jansson wrote:

Can you check if the delete problem is still there?

*lol* I guess no one checked.

Yes, it's still there. This is the error message:

An error was encountered
File: /home/httpd/vhosts/punres.net/httpdocs/manage/styles/delete.php
Line: 25

PunBB reported: Unable to fetch style

Database reported: Unknown table 'styles' in where clause (Errno: 1109)

Offline

 

#14 2005-04-26 17:58:55

Connorhd
Member
Registered: 2005-01-15
Posts: 176

Re: bug in style system

deleting a style worked fine for me

Offline

 

#15 2005-04-26 18:10:46

Jansson
Former Administrator
From: Sweden
Registered: 2005-04-24
Posts: 431
Website

Re: bug in style system

It works for me too. I have no idea what's causing that error for you guys.


// Jansson

PunRes developer | Blog
Winbas Affärssystem

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.