[RC] phpBB Gallery 1.0.4 (including TS Gallery converter)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
User avatar
naijand
Registered User
Posts: 52
Joined: Sun Nov 02, 2008 6:28 pm
Contact:

Re: [Beta] phpBB Gallery 0.4.1

Post 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
wolfman24
Registered User
Posts: 387
Joined: Tue Mar 07, 2006 12:07 pm

Re: [Beta] phpBB Gallery 0.4.1

Post 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.
EAnushan
Registered User
Posts: 17
Joined: Fri Aug 15, 2008 1:53 pm

Re: [Beta] phpBB Gallery 0.4.1

Post 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?
User avatar
naijand
Registered User
Posts: 52
Joined: Sun Nov 02, 2008 6:28 pm
Contact:

Re: [Beta] phpBB Gallery 0.4.1

Post 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.
User avatar
novanilla
Registered User
Posts: 332
Joined: Wed Jul 02, 2008 1:08 pm
Location: Colorado
Contact:

Re: [Beta] phpBB Gallery 0.4.1

Post 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?
User avatar
vwrmic
Registered User
Posts: 175
Joined: Mon Apr 07, 2008 11:06 pm
Location: Inside my server!

Re: [Beta] phpBB Gallery 0.4.1

Post 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.
EAnushan
Registered User
Posts: 17
Joined: Fri Aug 15, 2008 1:53 pm

Re: [Beta] phpBB Gallery 0.4.1

Post 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.
User avatar
novanilla
Registered User
Posts: 332
Joined: Wed Jul 02, 2008 1:08 pm
Location: Colorado
Contact:

Re: [Beta] phpBB Gallery 0.4.1

Post 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!
User avatar
DragonMaster1
Registered User
Posts: 994
Joined: Tue Aug 17, 2004 11:04 am
Name: Terry
Contact:

Re: [Beta] phpBB Gallery 0.4.1

Post by DragonMaster1 »

I think that you need to change the images location in one of these recent updates too
User avatar
novanilla
Registered User
Posts: 332
Joined: Wed Jul 02, 2008 1:08 pm
Location: Colorado
Contact:

Re: [Beta] phpBB Gallery 0.4.1

Post 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.
User avatar
novanilla
Registered User
Posts: 332
Joined: Wed Jul 02, 2008 1:08 pm
Location: Colorado
Contact:

Re: [Beta] phpBB Gallery 0.4.1

Post 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...
EAnushan
Registered User
Posts: 17
Joined: Fri Aug 15, 2008 1:53 pm

Re: [Beta] phpBB Gallery 0.4.1

Post 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.
User avatar
novanilla
Registered User
Posts: 332
Joined: Wed Jul 02, 2008 1:08 pm
Location: Colorado
Contact:

Re: [Beta] phpBB Gallery 0.4.1

Post 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!
User avatar
novanilla
Registered User
Posts: 332
Joined: Wed Jul 02, 2008 1:08 pm
Location: Colorado
Contact:

Re: [Beta] phpBB Gallery 0.4.1

Post 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.
User avatar
novanilla
Registered User
Posts: 332
Joined: Wed Jul 02, 2008 1:08 pm
Location: Colorado
Contact:

Re: [Beta] phpBB Gallery 0.4.1

Post 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!
Locked

Return to “[3.0.x] MODs in Development”