PDA

View Full Version : Social Group and Album Enhancements - Make a forum Gallery from User Albums


pipedreams
02-29-2008, 10:00 PM
UPDATE:
Well, there is another hack been released which is more or less the same as my initial hack, so I recommend that you all use that from now on
https://vborg.vbsupport.ru/showthread.php?t=172215

INTRO:

This is a crude attempt at making a forum gallery from all the user albums on your vb 3.7.x forum.

I can imagine that there are many other better ways to achieve this, but I think my method is quick and easy enough to be shared with other users on this forum.

It is also my first attempt at a vbulletin hack, so forgive my naivety re all this.

STEPS:
Copy the default vbulletin album.php file and rename to (say) gallery.php
Open this new file in a text / php editor and follow the instructions found in the attached galleryFromAlbumsMod.txt file.
That's it!DEMO:
http://www.badminton.ie/forum/gallery.phpHISTORY:
02.03.2008: 1.02 - Changed code to make sure only public albums are shown, added clause for guest navigation when paging, and hide username from top navbar.
==
02.03.2008: 1.01 - Changed code in order to page through all forum public user albums
==
01.03.2008: 1.00 - Initial basic galleryNOTES:
You need to set "Can View Albums" to yes in usergroup permissions. The amount of albums per page is decided by the value in "Albums Per Page" in "User Profile: Album Options" in adminCP options.
===
The amount of albums per page is decided by the value in "Albums Per Page" in "User Profile: Album Options" in adminCP options.
==
User css has an effect on the gallery look. (I have defaulted it to userid 1)COMING SOON:
Separate template for the gallery listing, which will enable the username to be displayed beside each respective album.

pipedreams
03-01-2008, 09:09 PM
* reserved *

Itworx4me
03-01-2008, 09:13 PM
Get the following error when you click your link for demo


You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
You are not logged in. Fill in the form at the bottom of this page and try again.
You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

pipedreams
03-01-2008, 09:16 PM
Apologies re this, I forgot the user albums were set to private on that forum.

Here is another instead:
http://www.badminton.ie/forum/gallery.php?u=1

Need to have the ?u=1 on the url, for the gallery to be available for guest viewing - (will work on sorting this out.)

7lanet
03-01-2008, 09:48 PM
thanks

very nice ^_^

but
Please activate visitors

ChurchMedia
03-01-2008, 10:15 PM
I was hoping someone would do this! It works great. Good job! :)

Zaiaku
03-02-2008, 12:31 AM
Awesome mod. No extra files just a copy of an existing one and nothing to import. Thx!

kevinfx
03-02-2008, 03:18 AM
nice idea
but it doesn't show all available album, only shows 10 albums ...

Brew
03-02-2008, 04:25 AM
The mod seems to pull in any custom CSS from the users profile.

http://www.oldhouseforums.com/forums/gallery.php?u=1

This could be a really good mod if you keep working on it. There's a lot you can do :)

pipedreams
03-02-2008, 09:26 AM
nice idea
but it doesn't show all available album, only shows 10 albums ...

I was thinking that this might happen, its obviously due to the limits set in admincp for user albums.

The mod seems to pull in any custom CSS from the users profile. Was thinking that that would happen to....

Anyway I promise to keep working on this, and may even write some stand alone code altogether...

Barakat
03-02-2008, 09:52 AM
works great ..

Magnumutz
03-02-2008, 10:05 AM
Very nice and simple method.
However, i have one question regarding a feature... can it be done that when you go to /gallery.php, it shows all the users' albums?

pipedreams
03-02-2008, 10:13 AM
Very nice and simple method.
However, i have one question regarding a feature... can it be done that when you go to /gallery.php, it shows all the users' albums?

Am working on that now and so far it's working fine:
http://www.badminton.ie/forum/gallery.php?u=1

The amount of albums per page is decided by the value in "Albums Per Page" in "User Profile: Album Options" in adminCP options.

Will update overall instructions very soon..

ChurchMedia
03-02-2008, 10:24 AM
I removed this code from the query:
LIMIT $start, $perpage

It's showing 14 galleries -- which is all we probably have right now (I'm trying to get members to use them).

http://www.churchmedia.net/albumgallery.php?u=1

pipedreams
03-02-2008, 10:34 AM
I removed this code from the query:
LIMIT $start, $perpage

It's showing 14 galleries -- which is all we probably have right now (I'm trying to get members to use them).

http://www.churchmedia.net/albumgallery.php?u=1

No need to remove that now - unless you want all albums on one page - as my updated version now correctly pages though the total amount pf public albums.

Boofo
03-02-2008, 10:46 AM
Any way to keep guests from being able to view the albums? Makie it only veiwable to members?

pipedreams
03-02-2008, 11:00 AM
Any way to keep guests from being able to view the albums? Makie it only veiwable to members?

Hi, that's decided by settings in usergroup permissions, where you'll find an option called "Can View Albums."

Boofo
03-02-2008, 11:21 AM
But won't the u=1 in the link bypass that?

pipedreams
03-02-2008, 11:43 AM
But won't the u=1 in the link bypass that?

Nope as the u=1 ensures the code acts as an album list, when a user is not logged in.

Barakat
03-02-2008, 12:48 PM
you should put it in a txt file .... and make update every time u make changes on ,,, so as we can know ...

thanks

pipedreams
03-02-2008, 01:05 PM
you should put it in a txt file .... and make update every time u make changes on ,,, so as we can know ...

Will do!

AWMGolfer
03-02-2008, 01:49 PM
Great mod...I love it!! The only two things I would add to it is one that would just show who's user gallery it is on the listing and it not show the galleries that are private. Other then that I think it's great. Simple but clean!!

Boofo
03-02-2008, 02:13 PM
Nope as the u=1 ensures the code acts as an album list, when a user is not logged in.

How do we keep guests from viewing the list? Or am I missing something here? ;)

The reason I am asking is I run a Fathers' Rights Site and I really don't want any perverts trolling the site looking for victims as we do have a few pictures of members' children in there.

Brew
03-02-2008, 04:08 PM
When you update this could you please send out a manual notice with instructions on what has changed?

This is a cool mod I want to keep track of :)

Thanks!

7lanet
03-02-2008, 04:16 PM
See worked the same explanation
But when the transition to a second page shows only the first page (only 10 albums)
Aita and is not available for visitors

www.7lanet.com/vb/g.php


Please give me the file that you point change

Copies 3.7.0 4, 3.7.0 5

kevinfx
03-02-2008, 04:55 PM
on the table header, it always says "admin's album" because user id = 1 is the admin

how do change that to something generic?

pipedreams
03-02-2008, 05:05 PM
Great mod...I love it!! The only two things I would add to it is one that would just show who's user gallery it is on the listing and it not show the galleries that are private.

Have changed it, so that only public albums are viewable, , and will add to mod soon.

See worked the same explanation
But when the transition to a second page shows only the first page (only 10 albums)
Aita and is not available for visitors

Have added a workaround for this, and will add to mod soon.

on the table header, it always says "admin's album" because user id = 1 is the admin

Am aware of this, but template changes will be needed, and I will probably do that with the version after this one. I also hope to add the username beside the album name.

pipedreams
03-02-2008, 05:09 PM
How do we keep guests from viewing the list? Or am I missing something here? ;)

As I'm just modifying vbulletin native code, guest viewing is controlled bu usergroup permissions found in your admincp.

Why don't you log out of your forum and see can if you view the album?

When you update this could you please send out a manual notice with instructions on what has changed?

Will do ;)

unitedpunjab
03-02-2008, 06:48 PM
Would you please share your 'gallery.php' :)

pipedreams
03-02-2008, 06:57 PM
Would you please share your 'gallery.php' :)

Don't know if I'm allowed to do that?
I say that as this mod modifies existing vbulletin native code, so I would imagine it would go against Jelsofts licence agreements?

Maybe someone else might let us know what is / is not allowed?

7lanet
03-02-2008, 07:21 PM
<a href="http://www.7lanet.com/vb/gallery.php" target="_blank">http://www.7lanet.com/vb/gallery.php</a>

:*_*:

Even after the last amendment the same problem
When introduced to the other Asfhat show only the first page
But the problem of visitors dissolved

7lanet
03-02-2008, 07:25 PM
Please: Can you amendment thereto
I Est amendment
No problem is solved with me

pipedreams
03-02-2008, 07:26 PM
Even after the last amendment the same problem
When introduced to the other Asfhat show only the first page
But the problem of visitors dissolved

Can you give pm me a test logon to you site, so I can see what your issue is?
Alas I can't read arabic - which I presume the website language is?

7lanet
03-02-2008, 07:34 PM
Regrettably my default language is Arabic
But you can change from under the English
But my request of you is the amendment to the file attached in the previous shrimps
Or give me your Gallery file

^_^

7lanet
03-02-2008, 07:40 PM
See my changes this former

Are there mistakes?


www.7lanet.com/vb/g.php
www.7lanet.com/vb/g2.php
www.7lanet.com/vb/g3.php

pipedreams
03-02-2008, 08:03 PM
Your g3.php seems correct to me, and from what I can tell it works as mine does:

e.g. I can page and view albums ok:
http://www.7lanet.com/vb/g3.php?u=1&page=4

Though you have to change the file name around line 1536 to the same name as you file name. (e.g. at moment in the file g3.php and you have gallery.php for the paging links)

7lanet
03-02-2008, 08:25 PM
ohhhhhhhhh

sorry

ok
I do not know how to express my thanks to you
^_^

pipedreams
03-02-2008, 08:40 PM
I do not know how to express my thanks to you
^_^

No problem, am glad it's working for you now. :D

ShawneyJ
03-04-2008, 06:14 AM
this is amazing will install later thanks.

rolandogomez
03-04-2008, 05:10 PM
Is there a way to get it to say only "Albums" instead of "X-user's Albums" on the category top? Thanks, rg.

Magnumutz
03-04-2008, 06:35 PM
Am working on that now and so far it's working fine:
http://www.badminton.ie/forum/gallery.php?u=1

The amount of albums per page is decided by the value in "Albums Per Page" in "User Profile: Album Options" in adminCP options.

Will update overall instructions very soon..
What i really meant was that when you go to /gallery.php, it displays all the albums that all the users have. Not just the admins... or is the admin on your forum the only one with an album?

rzepkaMM
03-04-2008, 07:06 PM
Thanks m8
I wait for this

pipedreams
03-04-2008, 07:19 PM
What i really meant was that when you go to /gallery.php, it displays all the albums that all the users have. Not just the admins... or is the admin on your forum the only one with an album?

Yes on that forum, only admins have albums so far.

Is there a way to get it to say only "Albums" instead of "X-user's Albums" on the category top? Thanks, rg.

With the next version, I will add a custom template, which will eliminate this issue..

pipedreams
03-16-2008, 05:48 PM
Well, there is another hack been released which is more or less the same as my initial hack, so I recommend that you all use that from now on :D

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