Page 118 of 212

Re: [Beta] phpBB Gallery 0.4.1

Posted: Tue Dec 30, 2008 4:54 pm
by naijand
nickvergessen wrote:you may just replace

Code: Select all

<!-- IF SCRIPT_NAME == "/gallery/index" -->
with

Code: Select all

<!-- IF S_IN_GALLERY -->
Thanks nickvergessen but it didnt work.

This is what I now get

Image

Plus all the other errors are still present. :cry:
naijand wrote:
  1. When I click on gallery, it makes my ''board index'' button active [as well as] itself
  2. The second and biggest problem is that when you are in 'gallery' and want to go to index and you click 'index' it stays on gallery and refuses to go to index, even with several clicks
  3. Now after the above you click on any other button on the menu it returns a 404 page not found error

Re: [Beta] phpBB Gallery 0.4.1

Posted: Tue Dec 30, 2008 5:19 pm
by wolfman24
naijand wrote:
  1. When I click on gallery, it makes my ''board index'' button active [as well as] itself
  2. The second and biggest problem is that when you are in 'gallery' and want to go to index and you click 'index' it stays on gallery and refuses to go to index, even with several clicks
  3. Now after the above you click on any other button on the menu it returns a 404 page not found error
For 2 and 3, they have nothing to do with this mod. This happens because you used relative links in your LinkBar (linke index.php). So if you are in tha gallery (in subfolder gallery/) and you press index (index.php) you will sure load gallery/index.php, the same is for the blog then (e.g. blog.php and then after the click it tries to load gallery/blog.php). So all you have to do is to make the links relativ to the root directory. Try using ./index.php instead of index.php.

Re: [Beta] phpBB Gallery 0.4.1

Posted: Tue Dec 30, 2008 8:22 pm
by EAnushan
In root/gallery/album.php:

Find:

Code: Select all

trigger_error($trigger_message . '<br /><br />' . implode(', ', $picrow));
trigger_error is a built in php function I believe, and it has a 1024 character limit. Now, because of this, whenever I click slideshow, only a handful of images will be displayed as links and be available for the slideshow.

I.e. Image1, Image2, Image 3, Image4, Image 5

When it should be Image1, Image2, .... Image20

Is there anyway around this?

Re: [Beta] phpBB Gallery 0.4.1

Posted: Tue Dec 30, 2008 10:32 pm
by naijand
wolfman24 wrote:
naijand wrote:
  1. When I click on gallery, it makes my ''board index'' button active [as well as] itself
  2. The second and biggest problem is that when you are in 'gallery' and want to go to index and you click 'index' it stays on gallery and refuses to go to index, even with several clicks
  3. Now after the above you click on any other button on the menu it returns a 404 page not found error
For 2 and 3, they have nothing to do with this mod. This happens because you used relative links in your LinkBar (linke index.php). So if you are in tha gallery (in subfolder gallery/) and you press index (index.php) you will sure load gallery/index.php, the same is for the blog then (e.g. blog.php and then after the click it tries to load gallery/blog.php). So all you have to do is to make the links relativ to the root directory. Try using ./index.php instead of index.php.
Thank you very much wolfman24,

./ didnt work but ../ worked for the root path. I no longer have the no 2 & 3 problems again.
I also used ../gallery/index.php for the subfolder path, I hope this is correct?.

For the no 1 problem, I however had to remove the menu_active_button code from 'index' menu code as it still makes both gallery and index active in spite of the above changes. I think it gets confused seeing 2 indexes in the codes, it couldn't differentiate the gallery index from the main index script I suppose:

<!-- IF SCRIPT_NAME == "../index.php" -->

<!-- IF SCRIPT_NAME == "../gallery/index.php" -->

For the gallery menu code, Nic suggested <!-- IF S_IN_GALLERY --> and I have used it instead of the above lower.

However I cant find replacement for the above top. <!-- IF S_IN_INDEX --> didnt work (i.e didn't make the index button active)
Would you know any other way of coding it

Thanks once again.

Re: [Beta] phpBB Gallery 0.4.1

Posted: Tue Dec 30, 2008 10:37 pm
by novanilla
naijand wrote:For the gallery menu code, Nic suggested <!-- IF S_IN_GALLERY --> and I have used it instead of the above lower.

However I cant find replacement for the above top. <!-- IF S_IN_INDEX --> didnt work (i.e didn't make the index button active)
Would you know any other way of coding it

Thanks once again.
How about using an <!-- ELSE_IF --> statement for all cases except when you're in the Gallery?

Re: [Beta] phpBB Gallery 0.4.1

Posted: Wed Dec 31, 2008 3:50 am
by vwrmic
Hi nickvergessen I think i've blown my gallery up!

I came to update it the other day and after following all the instructions I accidently did the installation part over my existing installation instead of the upgrade. This seems to have wiped my gallery which isn't the end of the world as these things can be re-uploaded. Afterwards I realized my mistake and used the installation part again to perform the upgrade this obviously made no difference.
The problem I seem to be having now is while the gallery is working, if I upload a picture, it doesn't actually upload. As soon as you press the upload button it shows that it's uploaded but the picture does not go onto the server and it doesn't show any picture.
I thought about deleting everything and starting again, gallery wise but i've no idea when it comes to the database side of things and don't fancy messing with anything in there.

Would you have any ideas on how I could fix this at all? Thanks.

Re: [Beta] phpBB Gallery 0.4.1

Posted: Wed Dec 31, 2008 6:00 am
by EAnushan
EAnushan wrote:In root/gallery/album.php:

Find:

Code: Select all

trigger_error($trigger_message . '<br /><br />' . implode(', ', $picrow));
trigger_error is a built in php function I believe, and it has a 1024 character limit. Now, because of this, whenever I click slideshow, only a handful of images will be displayed as links and be available for the slideshow.

I.e. Image1, Image2, Image 3, Image4, Image 5

When it should be Image1, Image2, .... Image20

Is there anyway around this?
Well managed to fix my problem.

Open root/gallery/album.php

Find:

Code: Select all

trigger_error($trigger_message . '<br /><br />' . implode(', ', $picrow));
Replace With:

Code: Select all

msg_handler(E_USER_NOTICE, $trigger_message . '&nbsp;<br /><br />' . implode(', ', $picrow), 'Not Required', 'Not Required');
trigger_error is native to PHP, while msg_handler is used to handle anything that is called with the trigger_error function. Calling the msg_handler directly instead of calling it through the trigger_error function allowed me to get around the 1024 character truncation that trigger_error does.

Re: [Beta] phpBB Gallery 0.4.1

Posted: Wed Dec 31, 2008 4:37 pm
by novanilla
So...

I managed to restore my site after my failed update from 0.4.0 RC2 to 0.4.1... Let me make sure I've got this right, now, before trying it again:

0.4.0 RC2 to 0.4.0 RC3 - Edit includes/cache.php
0.4.0 RC3 to 0.4.0 - Edit includes/functions.php, includes/session.php, and styles/prosilver/template/memberlist_view.html
0.4.0 to 0.4.1 - edit includes/functions_user.php

Upload all of these files, plus the new files in the 0.4.1 package, and run the install script. When the script starts, I select the update option (presumably to preserve all my existing albums), and follow directions from there.

Refresh the template and styles, and I'm good to go, right? Am I missing anything here?

Thank you!

Re: [Beta] phpBB Gallery 0.4.1

Posted: Wed Dec 31, 2008 5:04 pm
by DragonMaster1
I think that you need to change the images location in one of these recent updates too

Re: [Beta] phpBB Gallery 0.4.1

Posted: Wed Dec 31, 2008 5:18 pm
by novanilla
DragonMaster1, Thank you for your response!

Ah yes. In the middle step the files need to be moved. Can that be done afterward? Or do the three steps need to be taken one at a time with the files moved during the update from 0.4.0 RC3 to 0.4.0? See, I still don't know what went wrong when I tried it before (probably some stupid blunder on my part), but I want to make sure it doesn't happen again. Even with the existence of back-ups, it still makes me nervous.

Re: [Beta] phpBB Gallery 0.4.1

Posted: Wed Dec 31, 2008 7:42 pm
by novanilla
Oh good grief... I'm giving up after this, LOL.

Running the update script, I get this:

Code: Select all

Parse error: syntax error, unexpected ';', expecting T_FUNCTION in (mysite)/www/Members/phpBB3/includes/cache.php on line 467
So I go to my shiny new and edited includes/cache.php file and see this at line 467;

Code: Select all

?>
It's the last line of the file. I've checked the edit and can't for the life of me figure out where the issue is. Grrr...

Re: [Beta] phpBB Gallery 0.4.1

Posted: Wed Dec 31, 2008 11:19 pm
by EAnushan
Are you using something like Notepad ++ or PHP Designer 2007 - Personal to edit your files? I remember something similar happening to me when I used bad editors. They'd stick junk at the end of the file and then I'd get errors like yours.

Re: [Beta] phpBB Gallery 0.4.1

Posted: Wed Dec 31, 2008 11:32 pm
by novanilla
EAnushan wrote:Are you using something like Notepad ++ or PHP Designer 2007 - Personal to edit your files? I remember something similar happening to me when I used bad editors. They'd stick junk at the end of the file and then I'd get errors like yours.
Good question, EAnushan. I'm using what I've been using for two years for this - Coffeecup HTML editor. It can be buggy at times, but if I'm paying attention, it's always been safe. But I think I'll find a copy of Notepad++ and open it with that to see if it shows anything peculiar in there.

EDIT (ten minutes later)... Just downloaded and installed Notepad++ and looked at the file. Nothing unusual at the end, no extra ";" anyplace. Hmmmm..... Thank you, though!

Re: [Beta] phpBB Gallery 0.4.1

Posted: Thu Jan 01, 2009 12:41 am
by novanilla
Rolling my eyes....

I'm such a dumb***

In running comparisons of my cache.php files, before and after, and looking at where things are supposed to go and what they're supposed to replace, I found that I mistakenly over-wrote the last line of code in the cache.php file:

Code: Select all

return $albums;
	}
Which of course meant the file ended unexpectedly, with a "}" missing. Don't worry, I won't quit my day job.

Re: [Beta] phpBB Gallery 0.4.1

Posted: Thu Jan 01, 2009 1:34 am
by novanilla
Why doesn't anybody else seem to have these problems? I almost got through the entire update, and after the updater told me my database was changed and would I like to finish the installation, I clicked "proceed" or something like that, and saw this evil thing:

General Error
SQL ERROR [ mysqli ]

Column 'config_value' cannot be null [1048]

SQL

INSERT INTO phpbb3_gallery_config (config_name, config_value) VALUES ('link_imagepage', NULL)

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: install/install_functions.php
LINE: 190
CALL: dbal_mysqli->sql_query()

FILE: install/install_update.php
LINE: 738
CALL: set_gallery_config()

FILE: install/install_update.php
LINE: 77
CALL: install_update->update_db_data()

FILE: install/index.php
LINE: 188
CALL: install_update->main()

FILE: install/index.php
LINE: 60
CALL: module->load()

---------------------

Luckily, I'm getting to be very good at restoring my backups. I'm done. I'm totally dazed and confused, and I think I'll go out and drown my sorrows.

Happy New Year!