• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support Legacy SmugMug Customization Simple page listing all populated categories

Need some help with your New SmugMug Site?

Dgrin Challenges

Our Challenges moderator has lined up an new set of challenges for you. The Weekly Word Challenge. Get all the details and participate in the conversation Weekly Word Challenge.

Past DSS Challenge Winners, DSS Challenge Rules, and other important DSS Challenge information is here.

Looking for a little challenge? The Dgrin Mini-Challenges are a great way to challenge yourself. Take a moment to look through past winners and find the current Mini Challenge here.

From Around the Net

Enjoy a few of our favorite articles from around the 'net. If you have something you think we should see, post it here and we'll have a look.

Journeys

Landscapes

Sports

 
Thread Tools Display Modes
Old Jan-05-2012, 01:06 PM
#1
Torgado is offline Torgado OP
on the road less traveled
Torgado's Avatar
Simple page listing all populated categories
Greetings Smuggers!

Hey, I've been searching the forums, help site and general web for about an hour now looking for specific directions for creating a single page that automatically lists all populated categories.

For instance (using my smugmug acct): http://www.danielsoulegalleries.com/categories

This would pull up a page that simply lists all categories that have populated galleries. It would update when I add new categories or when I update galleries within the categories.

Looking for straight up solution if there is one...

Should I start by creating a category called 'categories' ?

Thanks y'all!
Old Jan-05-2012, 01:36 PM
#2
Allen is offline Allen
"tweak 'til it squeaks"
Allen's Avatar
Quote:
Originally Posted by Torgado View Post
Greetings Smuggers!

Hey, I've been searching the forums, help site and general web for about an hour now looking for specific directions for creating a single page that automatically lists all populated categories.

For instance (using my smugmug acct): http://www.danielsoulegalleries.com/categories

This would pull up a page that simply lists all categories that have populated galleries. It would update when I add new categories or when I update galleries within the categories.

Looking for straight up solution if there is one...

Should I start by creating a category called 'categories' ?

Thanks y'all!
Turn on the gallery/category box under the "homepage layout" button. The box will show up on your
homepage. Click "Display by categories".


To create a page to move this box to its own page see "The Galleries Page" sections of this tutor.
http://dgrin.smugmug.com/gallery/2160039
__________________
Al - Just a volunteer here having fun :D
My Website my Blog
Mozilla Firefox Web Developer Firebug
Customization FAQ Banner/Navbar/Slideshow Tutor
Old Jan-05-2012, 02:51 PM
#3
Torgado is offline Torgado OP
on the road less traveled
Torgado's Avatar
Quote:
Originally Posted by Allen View Post
Turn on the gallery/category box under the "homepage layout" button. The box will show up on your
homepage. Click "Display by categories".


To create a page to move this box to its own page see "The Galleries Page" sections of this tutor.
http://dgrin.smugmug.com/gallery/2160039
Hi Allen- thanks for the response.

I'm really looking for instructions to set up a different page than my Homepage... already have my homepage set up the way it needs to be.

Any ideas on setting up a page that I could navigate to e.g. www.danielsoulegalleries.com/categories ?
Old Jan-05-2012, 02:57 PM
#4
Allen is offline Allen
"tweak 'til it squeaks"
Allen's Avatar
Quote:
Originally Posted by Torgado View Post
Hi Allen- thanks for the response.

I'm really looking for instructions to set up a different page than my Homepage... already have my homepage set up the way it needs to be.

Any ideas on setting up a page that I could navigate to e.g. www.danielsoulegalleries.com/categories ?
That tutor I linked creates a duplicate homepage. Then with CSS you define what shows
on each page. It creates a duplicate homepage named "galleries" that you'd only show the
category box on. You could probably name the page "categories" if you want.
Believe me, it's what your looking for. The category box you want will show on your
homepage when you turn it on. The CSS will hide it there and show it on the dup page homepage.
__________________
Al - Just a volunteer here having fun :D
My Website my Blog
Mozilla Firefox Web Developer Firebug
Customization FAQ Banner/Navbar/Slideshow Tutor
Old Jan-05-2012, 03:07 PM
#5
Torgado is offline Torgado OP
on the road less traveled
Torgado's Avatar
Wow- yeah, I saw this tutorial; was really hoping that there was a more elegant and more simple solution than this.... I also saw one of the sorcerer's replies to this sort of request back in 2006 and that he would really consider just coding /categories like they have done for /popular etc. Bummer it hasn't been done, would be a very nice addition indeed.

Ok, well, if I gotta jump through the hoops, I gotta!

Thanks again, Allen.
Old Jan-05-2012, 03:11 PM
#6
Allen is offline Allen
"tweak 'til it squeaks"
Allen's Avatar
Quote:
Originally Posted by Torgado View Post
Wow- yeah, I saw this tutorial; was really hoping that there was a more elegant and more simple solution than this.... I also saw one of the sorcerer's replies to this sort of request back in 2006 and that he would really consider just coding /categories like they have done for /popular etc. Bummer it hasn't been done, would be a very nice addition indeed.

Ok, well, if I gotta jump through the hoops, I gotta!

Thanks again, Allen.
You will need a navbar for linking to all the pages, like the category page, maybe about me and
guestbook. Your homepage has no links now.
__________________
Al - Just a volunteer here having fun :D
My Website my Blog
Mozilla Firefox Web Developer Firebug
Customization FAQ Banner/Navbar/Slideshow Tutor
Old Jan-05-2012, 03:32 PM
#7
Torgado is offline Torgado OP
on the road less traveled
Torgado's Avatar
Hi Allen,

I'm going to pass on the navigation, don't really need site visitors navigating to it.

Unfortunately, I'm blowing it somewhere in my code... I'm a long time smugmug pro user and did some customization a couple of years ago to get the homepage set up the way I like it and have it now.

I'm guessing some of that customization is not allowing the /galleries page to show correctly- it is empty at this time ... see http://www.danielsoulegalleries.com/galleries

Following is my CSS customization (below will be my bottom javascript):

Any thoughts?

MY CSS:
=============================================
=============================================

/* html only page for gallery "Clients" 8210702_443Tt */
.gallery_8210702 .nophotos { display: none; }

/* Hide Breadcrumb when to all logged out users */
#breadcrumb {visibility: hidden;}
#altViews {visibility: visible;}
.loggedIn #breadcrumb {visibility: visible;}

/* Remove feeds from footer */
#feeds { display:none}

/* Remove Bio photo */
#bioBox .photo {
display: none;
}

/* Remove Bio Text */
#bioText {display: none;}

/* Center the front page slideshow */
#userBio {
text-align: center !important;
}

#homepage {width: auto !important; margin-left: 15px !important; margin-right: 15px !important;}
#bioBox {width: auto !important;}

/* Banner code for all pages */
#my_banner {
width: 747px;
height: 42px;
align: left;
background: url(http://www.danielsoulegalleries.com/...67_zzxdJ-O.png) no-repeat;
margin: 0 auto;
}

/* BEGIN navigation bar */
#navcontainer ul {
margin: 1em;
padding: 0;
list-style-type: none;
text-align: center;
}

/*#navcontainer ul li { */
/* display: inline;*/
/* outline-color: #b64c3e;*/
/* outline-style: solid;*/
/* outline-width: thin;*/
/*}*/

#navcontainer ul li a {
text-decoration: none;
padding: .1em 1em;
color: #f0ffdc;
background-color: #161616;
}

#navcontainer ul li a:hover {
color: #ffffff;
background-color: #161616;
}
/* END navigation bar */

/* BEGIN 2x2 Gallery Display */
.miniBox {
width:106px;
padding:0 0 5em 0;
margin:0 129px 0;
}

.miniBox .photo {
height:auto;
_height:1px;
}

.miniBox .albumTitle,
.miniBox .private {
text-align:center;
}

.albumLarge {
width:156px;
padding:0 0 5em 0;
margin:0 104px 40px;
}

.albumLarge .photoLarge {
height:auto;
_height:1px;
}

.albumLarge .albumTitle,
.albumLarge .private {
text-align:center;
}
/* END 2x2 Gallery Display */

/* Change "Featured Galleries" title */
YE.onAvailable('featuredTitle', function() {this.innerHTML = 'Portrait Samples Gallery'});

/* Hide Keywords on photo pages */
#photoKeywords {
display: none;
}

.galleries #bioBox {
display: none;
}

.galleries #galleriesBox,
.galleries #featuredBox {
display: block;
}

.galleries #slideshowBox {display: none;}

.galleries #photoVideoBox {display: none;}

=============================================
=============================================

MY BOTTOM JAVASCRIPT
function RemoveGalleryWord()
{
this.innerHTML = this.innerHTML.replace(/ Galleries$/, "");
}

YE.onAvailable("subCatGalleryTitle", RemoveGalleryWord);
YE.onAvailable("galleryTitle", RemoveGalleryWord);


// ------------------------------------------------------------------------
// Code to insert a download button
//
// Works for any gallery that has originals enabled
// And right-click protection off
// And gallery is in smugmug or smugmug small view
// ------------------------------------------------------------------------

function IsAnySmugmugView()
{
return(YD.hasClass(document.body, "smugmug") || YD.hasClass(document.body, "smugmug_small"));
}

function IsGalleryPage()
{
return(YD.hasClass(document.body, "galleryPage"));
}

onPhotoShow.subscribe(ProcessDownloadButton);

function ProcessDownloadButton()
{
// set onlyInGalleries to true if you only want a download button in gallery views
// set onlyInGalleries to false if you want a download button in other views too like (search, keywords, date, etc...)
var onlyInGalleries = false;
if (IsAnySmugmugView() && (IsGalleryPage() || !onlyInGalleries))
{
if (photoInfo[ImageID].albumOriginals && !photoInfo[ImageID]['protected'] && (photoInfo[ImageID].Format !== "MP4"))
{
var downloadParent = "cartButtonsWrapper";
if (!document.getElementById("cartButtonsWrapper"))
{
downloadParent = "altViews";
}
InsertDownloadButton(downloadParent);
}
else
{
// disable the button
var downloadButton = YAHOO.widget.Button.getButton("downloadButtonId");
if (downloadButton)
{
downloadButton.set("disabled", true);
}
}
}
}

function InsertDownloadButton(parentId)
{
// now add the download button
var parentDiv = document.getElementById(parentId);
var downloadButton = document.getElementById("downloadButtonId");
if (downloadButton)
{
// make sure it is enabled
YAHOO.widget.Button.getButton("downloadButtonId"). set("disabled", false);
}
else if (parentDiv)
{
var downloadButtonInfo =
{
id: "downloadButtonId",
label: "Download Image...",
container: parentDiv,
type: "button",
className: "sm-button sm-button-small themesButton glyphButton",
onclick: { fn: InitiateDownloadImage }
};

var dButtonObj = new YAHOO.widget.Button(downloadButtonInfo);
}
}

function InitiateDownloadImage()
{
// construct the download URL
window.location = "/photos/" + ImageID + "_" + ImageKey + "-D.jpg";
}

function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

if (hasPath("galleries"))
YD.addClass(document.body, "galleries");
Old Jan-05-2012, 03:57 PM
#8
Allen is offline Allen
"tweak 'til it squeaks"
Allen's Avatar
Quote:
Originally Posted by Torgado View Post
Hi Allen,

I'm going to pass on the navigation, don't really need site visitors navigating to it.

Unfortunately, I'm blowing it somewhere in my code... I'm a long time smugmug pro user and did some customization a couple of years ago to get the homepage set up the way I like it and have it now.

I'm guessing some of that customization is not allowing the /galleries page to show correctly- it is empty at this time ... see http://www.danielsoulegalleries.com/galleries

Following is my CSS customization (below will be my bottom javascript):

Any thoughts?

...
...
The box is not active. On your homepage click the "homepage layout" button and
check gallery/categories or default. BTW, no need to post your code, those that
can help can see it using web tools.


Change/add the red your CSS. The first one, change Feature ... title goes in your bottom javascript not CSS.
Code:
/* Change "Featured Galleries" title */
YE.onAvailable('featuredTitle', function() {this.innerHTML = 'Portrait Samples Gallery'});

.homepage #galleriesBox,
.homepage #categoriesBox,
.homepage #featuredBox {
display: none;
}

.galleries #bioBox {
display: none;
}

.galleries #galleriesBox,
.galleries #categoriesBox,
.galleries #featuredBox {
display: block;
}

.galleries #slideshowBox {display: none;} 

.galleries #photoVideoBox {display: none;} 
__________________
Al - Just a volunteer here having fun :D
My Website my Blog
Mozilla Firefox Web Developer Firebug
Customization FAQ Banner/Navbar/Slideshow Tutor
Old Jan-05-2012, 04:00 PM
#9
Torgado is offline Torgado OP
on the road less traveled
Torgado's Avatar
Allen, someday, I'm going to learn how to just follow the directions... maybe when I'm old and crotchety... wait, I'm already old and crotchety... :-)

Thanks so much for your help--- got the mod up and running correctly with the right CSS.

Have a good evening!
Tell The World!  
Tags
categories , category page
Similar Threads Thread Starter Forum Replies Last Post
Moving Gallery Categories from my home page. maxpictures Legacy SmugMug Customization 2 Dec-12-2011 06:18 PM
How to tame the Categories page nvsravank Legacy SmugMug Customization 2 Sep-22-2011 06:17 AM
categories page not centered, help? mtnbiker Legacy SmugMug Customization 2 Aug-28-2009 11:24 AM
Hiding categories in the galleries page TheMooney Legacy SmugMug Customization 5 Nov-22-2008 01:32 AM
Need Instructions For Building Site Please! magentawave Legacy SmugMug Customization 12 Sep-23-2008 05:45 PM


Thread Tools
Display Modes

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump