View Full Version : Using GreyBox with the simple-template
Jaspearth
07-23-2007, 09:31 PM
Now that my commentsystem is fixed, I'd like to use greybox instead of the ordenary pop-up that the simple-template uses.
My question is: How can i modify the "simple" template so the "add a comment"-function is a 'greybox'-pop-up?
I have tried a bit, but I can't find a solution. If you now click "comments" you get the comments-window instead of the pop-up.
(Infact i don't know what i have to refer to and where i have to copy the code in the template? Do I have to erase some of the old code?)
Can anyone help me? What does my code has to look like?
Thanks
http://jasperman.info
GreyBox: http://orangoo.com/labs/greybox/normal_usage.html
Dkozikowski
07-24-2007, 12:17 AM
Where is the folder greybox in relation to you're template file?
Place the greybox folder inside the simple template folder.
in your image_template.html file, change:
<script type="text/javascript" src="greybox/AJS.js"></script>
<script type="text/javascript" src="greybox/AJS_fx.js"></script>
<script type="text/javascript" src="greybox/gb_scripts.js"></script>
<link href="greybox/gb_styles.css" rel="stylesheet" type="text/css" />
to:
<script type="text/javascript" src="templates/simple/greybox/AJS.js"></script>
<script type="text/javascript" src="templates/simple/greybox/AJS_fx.js"></script>
<script type="text/javascript" src="templates/simple/greybox/gb_scripts.js"></script>
<link href="templates/simple/greybox/gb_styles.css" rel="stylesheet" type="text/css" />
Try that.
Jaspearth
07-24-2007, 08:44 AM
Goodmorning!
I had to change the path... (I'm an absolute newbee, but I love to learn stuff, and I already learned a lot.)
Now the Greybox thing is working, but the comment-popup is not showing. Instead i get some kind of a 404 error. I don't exactly know where to refer to in the link "add a comment". (check it out at www.jasperman.info )
I hope you understand what I mean.
This is the code I wrote in my image_template:
<span class="addcomment">
<a href="pixelpost/index.php?showimage=<IMAGE_ID>" title="Comment <IMAGE_TITLE>" rel="gb_page[500, 600]">Add a comment</a></span>
My pixelpostblog is first in a folder called pixelpost.
I have been looking at other blogs using greybox, but I can't find my mistake...
Greetings,
Jasperman!
Dkozikowski
07-24-2007, 09:24 AM
I was able to get greybox working just fine in no time ;)
Open your image_template.html file and delete everything inside it and replace it with the code bellow. Let me know how it works out for you.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title><SITE_TITLE></title>
<!-- Link for ATOM feed autodiscovery -->
<ATOM_AUTODETECT_LINK>
<!-- Link for RSS feed autodiscovery -->
<RSS_AUTODETECT_LINK>
<!-- META -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="content-type" name="keywords" content="PhotoBlog,<SITE_TITLE>,<IMAGE_TITLE>,Pixelpost,Jasper Cuvelier" />
<meta http-equiv="content-type" name="description" content="<SITE_TITLE>-PhotoBlog: <IMAGE_TITLE>, <IMAGE_NOTES_CLEAN>,Jasper Cuvelier" />
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="templates/simple/styles/light.css" title="light" />
<link rel="alternate stylesheet" type="text/css" href="templates/simple/styles/dark.css" title="dark" />
<!-- SCRIPTS -->
<script type="text/javascript" src="templates/simple/scripts/styleswitcher.js"></script>
<!-- GREYBOX -->
<script type="text/javascript">var GB_ROOT_DIR = "http://jaspearth.newsit.es/pixelpost/templates/simple/greybox/";</script>
<script type="text/javascript" src="templates/simple/greybox/AJS.js"></script>
<script type="text/javascript" src="templates/simple/greybox/AJS_fx.js"></script>
<script type="text/javascript" src="templates/simple/greybox/gb_scripts.js"></script>
<link href="templates/simple/greybox/gb_styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="navigation">
<h1><a href="index.php" title="Return to current image"><SITE_TITLE></a></h1>
<span class="menu">
<a href="index.php" title="Return to Homepage">Home</a> |
<a href="<SITE_BROWSELINK>" title="Browse">Browse</a> |
<a href="index.php?x=about" title="About">About</a>
</span>
</div>
<a href="index.php?showimage=<IMAGE_PREVIOUS_ID>">
<img src="images/<IMAGE_NAME>" alt="<IMAGE_TITLE>" title="<IMAGE_TITLE>" width="<IMAGE_WIDTH>" height="<IMAGE_HEIGHT>" id="photo" />
</a>
<div id="image-navigate">
<span class="image-previous"><IMAGE_PREVIOUS_LINK></span>
<span class="image-next"><IMAGE_NEXT_LINK></span>
</div>
<div id="image-info">
<span class="addcomment"> <a href="index.php?popup=comment&showimage=<IMAGE_ID>" title="<IMAGE_TITLE>" rel="gb_page[500, 600]">Add comment</a></span>
<span class="title"><IMAGE_TITLE></span> - <IMAGE_DATETIME>
<table width="100%">
<tr>
<td id="image-notes"><IMAGE_NOTES></td>
<td id="image-exif">
<EXIF_CAMERA_MODEL><br />
<EXIF_EXPOSURE_TIME><br />
<EXIF_APERTURE><br />
<EXIF_FLASH><br />
</td>
</tr>
</table>
</div>
<div id="footer">
Site Style: <a href="#" onclick="setActiveStyleSheet('light'); return false;">Light</a> /
<a href="#" onclick="setActiveStyleSheet('dark'); return false;">Dark</a> | <SITE_RSS_LINK> / <SITE_ATOM_LINK> |
<a href="http://validator.w3.org/check/referer" title="This website uses Valid xHTML">Valid xHTML</a> / <a href="http://jigsaw.w3.org/css-validator/check/referer" title="This website uses Valid CSS2">Valid CSS</a>
</div>
</body>
</html>
Jaspearth
07-24-2007, 09:27 AM
This forum has the best opensource software - support ever.
Thank you very much for helping me with my (perhaps stupid) questions.
:rolleyes:
Jasperman
Dkozikowski
07-24-2007, 09:29 AM
This forum has the best opensource software - support ever.
Thank you very much for helping me with my (perhaps stupid) questions.
:rolleyes:
Jasperman
:)
We try to help as much as possible.
And no question is a stupid question in my book.
Enjoy!
(Also, I made a test comment on your blog to make sure greybox works as it should and it did. You can delete or keep this comment if you wish.)
lcevallo
08-01-2007, 07:54 PM
Hi everyone
My name is Luis Cevallos I have a problem I need to redirect the main page who summon the page with de greybox effect
That is to say, I want to close the window that have the effect of greybox and then redirect the main page to another page please
Help me.
Thanks for everything.
Luis Cevallos Cavero.
Guayaquil-Ecuador.
lcevallo@gmail.com:confused:
Tok'Ra
08-01-2007, 09:21 PM
Hello!
I'm a new one. I'm not a programer. Where is download page when I can find
instalation version Pixelpost 1.6 or 1.7 with implementation of Greybox or Lightbox or Thickbox?:(
I'm very suprised that so good software for photoblog have no newer version with most wanted modification.:(
If you have new instalation version of files - please send me on my e-mail or
aleksiej.kurakin (AT) gmail (dot) com
Thank you for any helping.
My start test photopblog: http://swinoujscie.makas24.pl/ is working good, but in original version I think is unacceptable. Why programers do so simple and unpretty version?:confused: Why in pixelpost wikipedia is no any theme about greybox or lightbox. This software is for photo...so?
Best regards
Dkozikowski
08-01-2007, 10:49 PM
Hello!
I'm a new one. I'm not a programer. Where is download page when I can find
instalation version Pixelpost 1.6 or 1.7 with implementation of Greybox or Lightbox or Thickbox?:(
I'm very suprised that so good software for photoblog have no newer version with most wanted modification.:(
If you have new instalation version of files - please send me on my e-mail or
aleksiej.kurakin (AT) gmail (dot) com
Thank you for any helping.
My start test photopblog: http://swinoujscie.makas24.pl/ is working good, but in original version I think is unacceptable. Why programers do so simple and unpretty version?:confused: Why in pixelpost wikipedia is no any theme about greybox or lightbox. This software is for photo...so?
Best regards
Pixelpost is a lightweight photo blogging application. It provides you with the tools necessary to upload and post your photos to the world wide web.
Greybox / Lightbox / Thickbox has nothing to do with posting your photos to the web. These scripts are cosmetic / design modifications and are used within your template files.
Pixelpost provides you with a simple "unpretty" version for you to start with. Some like it's simplicity and use it as is. If you're not happy with pixelposts default theme, then you have 2 options as does the rest of Pixelposts user base.
A) Find and download a previously made template by a contributing author.
B) Design your own
We already handed you the possibility to display your photos to the world, now it's up to you to determine how people will view them.
If you want to use Greybox / Lightbox / Thickbox, do a search on the forums as it's all been covered before. Or, you can easily implement any one of these by visiting there respective websites and reading the supplied documentation.
Dkozikowski
08-01-2007, 10:50 PM
Hi everyone
My name is Luis Cevallos I have a problem I need to redirect the main page who summon the page with de greybox effect
That is to say, I want to close the window that have the effect of greybox and then redirect the main page to another page please
Help me.
Thanks for everything.
Luis Cevallos Cavero.
Guayaquil-Ecuador.
lcevallo@gmail.com:confused:
I'm sorry but I'm not sure what you wish to accomplish.
levitlarsen
08-29-2007, 04:42 PM
Hi there, I'm new here. I think I know what he means and I think it's the same thing I want to accomplish. Here's my situation:
I have a homepage with links. Some of the links open a greybox square. Let's say you click on one of those links and then in the greybox there is a link back to the home page. If you click this, you will get the homepage on top of the homepage. How can you make the link close the greybox and go to the homepage. (I already have a button that closes the greybox, but I need it to also go to a link). Thanks,
Levi
Try this:
<a href="#" onclick="GB_hide();window.location=http://here.is.some.url.com/test.site.php">Click</a>
levitlarsen
08-29-2007, 05:28 PM
Thank you very much for replying so fast. Here's the code you gave me:
<a href="#" onclick="GB_hide();window.location=http://here.is.some.url.com/test.site.php">Click</a>
can I use a relative address in place of here.is.some.url.com/test.site.php, as I'm developing on my local machine? That is telling where the greybox is, right?
Thanks
levitlarsen
08-29-2007, 05:32 PM
Thank you very much for replying so fast. Here's the code you gave me:
<a href="#" onclick="GB_hide();window.location=http://here.is.some.url.com/test.site.php">Click</a>
can I use a relative address in place of here.is.some.url.com/test.site.php, as I'm developing on my local machine? That is telling where the greybox is, right?
Thanks
here's something I tried and it just closed the greybox:
<a href="../front/instructions" onclick="parent.parent.GB_hide();">Click</a>
Thank You
levitlarsen
08-29-2007, 08:35 PM
Hi everyone
My name is Luis Cevallos I have a problem I need to redirect the main page who summon the page with de greybox effect
That is to say, I want to close the window that have the effect of greybox and then redirect the main page to another page please
Help me.
Thanks for everything.
Luis Cevallos Cavero.
Guayaquil-Ecuador.
lcevallo@gmail.com:confused:
Hi, I found this on another board and it worked for me:
<a href="http://link.com"
onclick="top.window.location.href='this.href';
parent.parent.GB_hide();">this link</a>
in place of http://link.com I put my relative link and in place of this.href I put the same link
bigjoe D
11-18-2007, 10:50 AM
When a picture is displayed using greybox, the wrong quantity of pictures is displayed. For example, if I have only 1 picture, it says 1/2, if I have 2 picutres then 3/4 and so on.
Anybody knows the reason for this?
Thanks
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.