Tutorial: How to Integrate Gallery into your Website (Gallery 1.4.x / 1.5.x)
Shadow_Wolf
![]()
Joined: 2004-04-03
Posts: 181 |
![]() |
I decided to write this taking some information from Gaile's Tutorial because I found myself getting confused. Personally I'm a visually person and it went into a lot of explanation on what edited one, what TR and TD commands used, where what went where. Not everyone is very familar with Table setup and a lot of people use a web editing program like Dreamweaver, Frontpage or some freeware. Now that I've actually done it, everything is much easier but I was trying to understand what the code meant and couldn't visualize it. So I've broken down into a few easy steps. 1. First design your website or the template for your Gallery. Gaile's Gallery Custom Tutorial Guideprovides a lot of good information. It also has code you can C&P and explains what does what. All the comments unfornately was confusing me because I just needed to know where to break up the HTML in my layout into Header and Footer. Example 1 - Simple Layout In these two examples you can see where everything is laid out. Example 1 lets you edit the sections you want. All you need to do is go to View > Source and then C&P (Copy and Paste) the code into the html portion of your wed editor. Example 2 is a little more complex but it shows you more what I mean by design your layout. Leave a large portion in the middle for your gallery, as you can see by the large white space. 2. Label Your Gallery Space What I mean by that is in your editor or the blank space you've left for the Gallery put in there This is your gallery. Example 1 shows where I have done so, Example 2 - More Complex Layout shows the white space where you will need to label your Gallery Space. I found labeling the space makes things easier because you will mark in the code where you will be breaking your layout into 2 seperate portions Header and Footer. Basically your Header file will contain the top banner cell and your left column, the Footer contains the right column and bottom. It then will wrap around your gallery, hence the name Wrapper. A lot of mistakes I've made was from C&P the columns, which was right but if you miss a TR, TD tag or leave something open without a close tag it will cause the layout to distort. View the HTML portion of your layout in your web editor. Go to where you have labeled "This is your Gallery" and you'll see that the text will be between a <TD and a </TD tag. Highlight anything above your text, "This is your Gallery" from the <TD tag above it all the way to the top. Cut and paste that into your wrapper.header.default (located in your html_wrap directory) at the end after all the php code. Everything under your text, "This is your Gallery" from the </TD tag and below, cut and paste that into your wrapper.footer.default (located in html_wrap directory) at the end after all the php code. 3. Upload and Test It. I hope that helps someone. This was written fairly fast but sometime when I get some time I'll flesh it out more with screenshots to give a more visual presentation so that things are easier to understand. I know reading a few paragraphs of instructions can be confusing espcially when there are a lot of TD, TR, etc tags and if you have no real experience editing HTML it makes things difficult. Let me know if there are things you'd like more detail on, screenshots on, etc included in the Tutorial and I'll try to add them. Thank you. |
|
manaan
Joined: 2004-02-14
Posts: 13 |
![]() |
Shadow_Wolf, |
|
Shadow_Wolf
![]()
Joined: 2004-04-03
Posts: 181 |
![]() |
You can find all the information that I used to modify that here: http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=16391 That should help you get what your looking for. If you need any help please let me know in that thread. |
|
jedbro
Joined: 2004-05-14
Posts: 4 |
![]() |
What about. modifying the head tags? Any way to do that? |
|
Roo
![]()
Joined: 2003-07-16
Posts: 88 |
![]() |
Add your script (and meta tags) betwwen the head tags in: albums.php |
|
Roo
![]()
Joined: 2003-07-16
Posts: 88 |
![]() |
Just wanted to add something: I found that if your custom footer consists of a table that should be at the bottim, what happens is if you follow the tutorials that footer ends up being added to a column span within the gallery td and the right sidebar td. To avoid this add the closing Gallery table tag after the right sidebar, *don't* add a new row, and then add your tabled footer. What you are doing is closing the whole gallery table and adding another one for the footer, as opposed to trying to nest the footer table. I actually struggeld with this for a few hours, knowing full well the problem had to be with a closing tag somewhere. Afer some trial and error I straightened it out. |
|
jedbro
Joined: 2004-05-14
Posts: 4 |
![]() |
Roo wrote:
Add your script (and meta tags) betwwen the head tags in: Excelent. |
|
lubopitko
Joined: 2004-09-23
Posts: 1 |
![]() |
I try to include my header in albums.php include "myheadar.php"; Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at myheader.php:3) in /httpdocs/Gallery/session.php on line 60 I have session_start() in myheadar.php |
|
creedsf
Joined: 2004-09-27
Posts: 4 |
![]() |
Hi. I am trying to add a header and footer to my Gallery. I read Gaile's tutorial and I din't understand on thing. She states that you just tneed to copy and past under the php code. That does just mean at the bottom of the page? Here is the code. Any help greatly appreciated. <?php global $GALLERY_EMBEDDED_INSIDE; if(isset($GALLERY_EMBEDDED_INSIDE)) { if ( switch ($GALLERY_EMBEDDED_INSIDE_TYPE) { case 'phpnuke': /* /* eval($header); OpenTable(); $index = $tmp_index; case 'phpBB2': global $phpbb_root_path; // Sort out the page title // Verify that the $phpbb_root_path isn't overwritten with a remote exploit case 'GeekLog': } |
|
lesault
Joined: 2004-10-02
Posts: 2 |
![]() |
Thanks for the Tutorial, Shadow Wolf. That makes my site look a lot better! I have one small problem I hope someone can help me with. There seems to be a blank space at the top of the page with the gallery which isn't on any of my other pages. You can take a look at my site at www.lesault.com (click the gallery link to see what I mean) I'm sure it's easy enough to fix, but I don't know where to start looking. Thanks in advance for your help. Lesault. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
in the skin you are using ( lesault.com/gallery/skins/bblue/css/embedded_style.css ) change Dave |
|
lesault
Joined: 2004-10-02
Posts: 2 |
![]() |
Dave, You're my hero Lesault |
|
jassyjas
Joined: 2004-10-13
Posts: 34 |
![]() |
Dave, thanks so much. At last I'm getting somewhere..... I'm html & php illiterate, but thanks to the tutorials i've got this far. Please can someone tell me how to get rid of the borders around my tables. All around the outside of the page i can see the teal green background colour which is the default background colour for standalone gallery style sheet. Also, I want to put a frame above my logo and down the right and left sides and then along the bottom of the whole table. Like JoJo has at http://www.josefrancocastillo.com.ph/. Can someone point me in the right direction to learn how to do this. Thanks millions...... Oh yeah - my site = www.sheridanfamily.com/gallery |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
jassyjas, Dave |
|
west4me
Joined: 2004-03-07
Posts: 75 |
![]() |
This worked great! I have one problem though. Everything looks fine but when I go to a larger size of picture within an album it breaks the table size and starts to re-tile the images I use for the background. Also the footer does not show up in I.E. but does in Mozilla. Any suggestions? |
|
J&J
Joined: 2004-11-28
Posts: 2 |
![]() |
Ok, here's my deal... I've edited the header.wrapper & footer to look like my website template. The website template looks like this: http://family.jandjwebservices.com/TEMPLATE.php It works by pulling in HTML files into the template's body using php include. This way, I don't have to type up all of the <head> and <body> stuff over & over again for each web page, as it's all found in the template. Now, when viewing the photo album sample I had made, for some reason the scroll bars have disappeared, so you're unable to access anything beyond what's shown on your screen. Take a look: http://jandjwebservices.com/v-web/gallery/caitlin This is a real pain. Is there any way to just say to heck with the wrappers and "pull" those album pages into my template using php include? Or else, can anyone figure out why the scroll bars disappear when gallery's viewed, even though the scrollbars work fine on any other page in the site? I think the problem is that the header.wrapper falls under some default <head> stuff, but I have javascript, external styles, & such that requires being placed within the <head>. Where is the actual <head> document (the stuff above the wrapper files as shown when you view the page source) so that I can edit it? |
|
J&J
Joined: 2004-11-28
Posts: 2 |
![]() |
Never mind, I fixed it. All of the stuff that needed to be in the <head>, I had inserted (php echo) into the util.php page, starting where the doctypes are mentioned (line 2841 or so). Then I left all of the body/layout stuff in the wrapper.header. After tweaking the util.php, it seems that the albums are working great now. |
|
e2
![]()
Joined: 2004-12-15
Posts: 3 |
![]() |
west4me, |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
e2, Dave |
|
e2
![]()
Joined: 2004-12-15
Posts: 3 |
![]() |
Thanks Dave, I don't know how I'd even begin to write up a tutorial of how I managed most of the layout and stuff. Some of it is loosely based on Ruthsarian's Gargoyle css, but mostly me. I've been quite proficient in raw html since hypercard, but only recently (couple of months) began studying css, xhtml and php. If anyone is interested in how I did something, just ask. I highly recomend only using tables where they are really necessary. It seems as though every browser on every platform wants to render the box model their own way. One of the tools I use to check my site's layout on various browsers/platforms is called browsercam.com (for those of you without a Mac, a Linux box and a Windows box). ;] -e2 |
|
gatoruss
Joined: 2004-12-17
Posts: 23 |
![]() |
I am trying to work my way thru Gaile and Shadow Wolf's tutorials. I am dense because I don't follow a few things: 1. Where I am supposed to paste the code from Gaile's tutorial? The code in wrapper.header.default is below. Do I just paste at the bottom this code? 2. When I edit the wrapper.header.default and same as wrapper.header, the "save as" prompts for a file type. What type to I select "html"? "text"? I have been trying differennt things for hours with no results. Sorry if this is basic and I am missing something. Any help would be appreciated. Thanks. <?php global $GALLERY_EMBEDDED_INSIDE; switch($GALLERY_EMBEDDED_INSIDE) { /* /* eval($header); OpenTable(); $index = $tmp_index; |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
1. from Gailes tutorial Quote:
Scroll to below the PHP code and add the following ..... so that means add her code at the very end. AFTER the ?> 2. save it as .txt and then you will have to rename it without the .txt extention before you FTP it to your server. The file does not need a extention. When you opened it it had a .default extention. Dave |
|
gatoruss
Joined: 2004-12-17
Posts: 23 |
![]() |
Thanks, Dave! I really do appreciate your help. Seems that I had the code placement correct. The problem I was having was the extension. I was saving as ".txt". I couldn't rename before upload, but was able to rename after. Now it seems to be working! |
|
jaype
![]()
Joined: 2005-01-29
Posts: 1 |
![]() |
:roll: Links in this artilce are broke. Please pay some attention to them. |
|
Gaile
Joined: 2002-07-20
Posts: 1301 |
![]() |
jaype wrote:
:roll: Links in this artilce are broke. Please pay some attention to them. Which links are you referring to? Gaile |
|
shoptangerine
Joined: 2005-09-15
Posts: 7 |
![]() |
ARGHHHHH |
|
brocaa
Joined: 2004-05-06
Posts: 39 |
![]() |
Hi shoptangerine I've had a quick look at your site - have you got this to where you want it to be? To fit this seamlessly with your website there are several files that you need to edit. The main one is the header.wrapper which is in your html_wrap directory. You need to build a table row that has your main header in it. You might get lucky and be ably to simply add your code in and it'll work without any messign around - ie You'll also need to make additions to the css file in your theme for the id's logo and header I hope this helps. If not drop me a line at aaron@covenantsolutions.co.uk
Aaron Brockhurst |
|
tinanoyes
Joined: 2005-11-06
Posts: 6 |
![]() |
Hello, I think I have the idea, but I can't find an " html_wrap directory" anywhere in my gallery directory... is it in a sub-folder somewhere? |
|
LordShaper
Joined: 2003-10-11
Posts: 3 |
![]() |
Is there any way that someone could help me change my design from left only sidebar to having a left and right? I can't figure out what to do and Gailes Tutorial doesn't seem to exist anymore. |
|
mrf00rk
![]()
Joined: 2005-06-02
Posts: 158 |
![]() |
*Bump* |
|
twooten
Joined: 2006-03-13
Posts: 2 |
![]() |
LordShaper did you ever find the html_wrap dir? I've been looking for two days and can't find it. Thanks Tim |
|
citizenofdis
Joined: 2006-02-02
Posts: 8 |
![]() |
I haveone problem with customization. For the sidebar, I use <!-- include statement to have sidebar code in a separate file for easy editing throughout my website. However, when I add the same include statement to the gallery file it is being ignored. Is there a way to use include with gallery? |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
citizenofdis wrote:
I haveone problem with customization. For the sidebar, I use <!-- include statement to have sidebar code in a separate file for easy editing throughout my website. However, when I add the same include statement to the gallery file it is being ignored. Is there a way to use include with gallery? Are you using a php function? Dave |
|
citizenofdis
Joined: 2006-02-02
Posts: 8 |
![]() |
I wasn't. I used the SSI include. I tried the php include now, with no success. |
|
mrf00rk
![]()
Joined: 2005-06-02
Posts: 158 |
![]() |
Try to include with a url, like www.someurl.tld/thefile.php. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
citizenofdis wrote:
I wasn't. I used the SSI include. Start a new topic with your code. |
|
citizenofdis
Joined: 2006-02-02
Posts: 8 |
![]() |
The URL suggestion worked, so no need. Thanks for both of your help. |
|
John D.
Joined: 2006-06-18
Posts: 2 |
![]() |
After modifying the wrapper.header.default and wrapper.footer.default according to the guidelines posted here, everything seems to be working fine, with one major exception: When I click on a thumbnail in any of my galleries to open the full sized picture, all the links to my template break. It appears that when you access a photo it goes deeper in the directory structure, which breaks all of the relative references in the template. Is there any way around this aside from re-creating the template with absolute references? Thanks in advance for any help you can provide! John |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
John D. wrote:
Is there any way around this aside from re-creating the template with absolute references? Sorry but the answer is Nope; http://gallery.menalto.com/node/30992 Dave |
|
John D.
Joined: 2006-06-18
Posts: 2 |
![]() |
Thanks for the quick response. The thread you provided was a great help. |
|
alex86
Joined: 2006-06-22
Posts: 1 |
![]() |
I added my header and footer to the wrapper header and footer files.. However, My problem is in css now. I created a new files in the css dir named embedded_stlye.css just like the instructions say but still my css is not working.. here is what it looks like <www.iowagamma.org/gallery> how do i get css to work? thanks alex |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
alex86 2. when you import your css use the full url. 3. Save the file without the .default extention. Then when you upgrade it will not be lost. 4. You might want to do the same for the JavaScript as well. Same in your footer files you don't need </html> and </body> Dave ____________________________________________________ |
|
bigredcherokee
Joined: 2005-12-27
Posts: 16 |
![]() |
I need some assistance. www.bayoujeepersoffroad.com/gallery I want to put the menu bar and header of the main bayoujeepersoffroad.com page in the gallery. No matter what I do I get a black page when I add these statements: <?php include("inc/menu.php"); I have tried the wrap.header and gallery.header both with no luck. I pull the statements out and it wirtes the page correctly. Please help! |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
in html_wrap/wrapper.header you have <?php include("inc/header.php"); include("inc/menu.php"); ?> global $GALLERY_EMBEDDED_INSIDE; global $GALLERY_EMBEDDED_INSIDE_TYPE; you close the php but don't open it again Dave ____________________________________________________ |
|
bigredcherokee
Joined: 2005-12-27
Posts: 16 |
![]() |
Ok I did it and still writes a black page. <?php include("inc/menu.php"); global $GALLERY_EMBEDDED_INSIDE; if(isset($GALLERY_EMBEDDED_INSIDE)) { I still have the wrap.header.default in the same directory as wrap.header. would that cause the problem? |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
I guess bothof us are not looking closley <?php // $Id: wrapper.header.default,v 1.20 2004/03/31 21:11:43 jenst Exp $ // This header file detects whether Gallery is embedded in any // known PHP applications and then decorates Gallery appropriately. <?php remove the last opening <?php Dave ____________________________________________________ |
|
bigredcherokee
Joined: 2005-12-27
Posts: 16 |
![]() |
Dave Thanks for the help. I'm not that familiar with PHP. My good friend is but he is out of town. I know enough to be dangerous with it. ok I took care of what you asked. include("inc/header.php"); include("inc/menu.php"); global $GALLERY_EMBEDDED_INSIDE; if(isset($GALLERY_EMBEDDED_INSIDE)) { This is what I have now at the beginning. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
You need a opening php tag: Dave ____________________________________________________ |
|
bigredcherokee
Joined: 2005-12-27
Posts: 16 |
![]() |
Quote:
You need a opening php tag: Ok I took care of that. now it wirtes the page but dosn't show the header of menu from my inc statement. I just don't understand why this is so much a PIA. I really appreciate your assistance with this. |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
Floridave, did anyone ever tell you that you rock? I've seen more assistance provided from you than just about anyone on G1. Thanks for your support and commitment! I've done so many mods to my G1 that I'll probably never 'upgrade' to G2. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Quote:
I just don't understand why this is so much a PIA. I really appreciate your assistance with this. Different servers behave different so you will have to try an experiment. In your html_wrpa directory put this file and save as test.php: <?php include("inc/header.php"); include("inc/menu.php"); @include("inc/header.php"); @include("inc/menu.php"); include("http:yoursite.com/inc/header.php"); include("http://yoursite.com/inc/menu.php"); ?> See if it functions or just dies take one line out at a time and try again, then add one back in at a time. Try combos of the code and see what works. Quote:
Floridave, did anyone ever tell you that you rock? I've seen more assistance provided from you than just about anyone on G1. Thanks for your support and commitment! Thanks. It is posts like yours that make my day. It is my way to donate to Gallery as I have not donated any $$$ (but I have been told that support has more value) Dave ____________________________________________________ |
|