Welcome to Geeklog, Anonymous Saturday, December 28 2024 @ 04:22 am EST
Geeklog Forums
Using variables in normal blocks
Status: offline
jlhughes
Forum User
Full Member
Registered: 04/25/02
Posts: 154
Here\'s the problem: I have duplicate Geeklog installs on a development server and a commercial server. At least, I would like to have them be as close to identical as is possible. (Obviously, config.php and, to a lesser extent, lib-common.php must contain unique, site-specific info.)
My problem shows up in two places:
1. Normal blocks where I\'ve included links. For instance, the normal block link to my Gallery install contains the complete URL, including the domain name. You can\'t just have gallery/index.php because you don\'t always start from the web root. The first alternative that comes to mind is to switch from normal blocks to php blocks and then put all of these in lib-custom.php and use the $_CONF[site_url] variable. Is there any other option for passing the site url variable to a normal block? The theme variable {site_url} gets stripped out.
2. The database hard-codes the domain name with the included images and the what\'s related links for stories. As a result, if you dump the database from one install into the other install, all of the images and related links in the articles contain the wrong (original) domain info. Is there a way around this?
John Hughes
10
8
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by jlhughes:Is there any other option for passing the site url variable to a normal block?
Normal blocks don\'t support variables.
Quote by jlhughes:The database hard-codes the domain name with the included images and the what\'s related links for stories.
The What\'s Related block is created dynamically in 1.3.8, so that shouldn\'t be a problem any more (and for 1.3.7, there\'s this script I wrote).
You\'re right about the URL for images - completely missed that one. That should be addressed in a future release. Can you submit a bug report, so it\'s not forgotten?
bye, Dirk
10
10
Quote
Justin
Anonymous
On normal blocks, you can list urls without the domain name. By placing a / first the server treats it as starting from the root. For example,
/gallery/index.php == http://www.yourdomain.tld/gallery/index.php
This is what I do in normal blocks to get around moving from a development to a production site.
11
9
Quote
Status: offline
jlhughes
Forum User
Full Member
Registered: 04/25/02
Posts: 154
On normal blocks, you can list urls without the domain name. By placing a / first the server treats it as starting from the root. For example,
/gallery/index.php == http://www.yourdomain.tld/gallery/index.php
Hmmm. I could have sworn I tried this. But I realize now that my problem was that I used gallery/index.php instead of /gallery/index.php.
Thanks
12
8
Quote
All times are EST. The time is now 04:22 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content