Welcome to Geeklog, Anonymous Tuesday, December 24 2024 @ 09:14 am EST
Geeklog Forums
Entire Page Static Page over Topic
Status: offline
LWC
Forum User
Full Member
Registered: 02/19/04
Posts: 818
Let's say I have a static page with the following attributes:
Centerblock: checked
Position: Entire Page
Topic: General News
Now, the documentation says:
Tip: When using a static page as a "splash" screen, you may need a link that takes your visitors to the normal index page, i.e. the list of current stories. To do this, create a link to index.php?display=all
But what the tip fails to mention is what if the entire page is actually a specific topic and not the main page?
For example, try entering the following such a static page:
<script>
document.write('<a href="' + document.location +
'&display=all">Click here to continue...</a>')
</script>
This creates a link based on the topic and adds &display=all to its query line.
So http://www.whatever.com/index.php?topic=General
turns into
So http://www.whatever.com/index.php?topic=General&display=all
But Geeklog simply treats it as if it's still
http://www.whatever.com/index.php?topic=General
so I still see the "splash"!
Actually, I guess this explains it...
[quote index.php]
if (isset ($HTTP_GET_VARS['display']) && empty ($topic)) {
.
$displayall = true;
.
}
[/quote]
"empty ($topic)"...?
And obviously, other than "display", no other parameter (like "page") can help because later on it says:
[quote index.php]
if (!$newstories && !$displayall) {
// give plugins a chance to replace this page entirely
.
.
.
[/quote]
But what if the topic is not empty?
The "entire page static page" kills the topic...
Centerblock: checked
Position: Entire Page
Topic: General News
Now, the documentation says:
Tip: When using a static page as a "splash" screen, you may need a link that takes your visitors to the normal index page, i.e. the list of current stories. To do this, create a link to index.php?display=all
But what the tip fails to mention is what if the entire page is actually a specific topic and not the main page?
For example, try entering the following such a static page:
<script>
document.write('<a href="' + document.location +
'&display=all">Click here to continue...</a>')
</script>
This creates a link based on the topic and adds &display=all to its query line.
So http://www.whatever.com/index.php?topic=General
turns into
So http://www.whatever.com/index.php?topic=General&display=all
But Geeklog simply treats it as if it's still
http://www.whatever.com/index.php?topic=General
so I still see the "splash"!
Actually, I guess this explains it...
[quote index.php]
if (isset ($HTTP_GET_VARS['display']) && empty ($topic)) {
.
$displayall = true;
.
}
[/quote]
"empty ($topic)"...?
And obviously, other than "display", no other parameter (like "page") can help because later on it says:
[quote index.php]
if (!$newstories && !$displayall) {
// give plugins a chance to replace this page entirely
.
.
.
[/quote]
But what if the topic is not empty?
The "entire page static page" kills the topic...
6
10
Quote
Status: offline
LWC
Forum User
Full Member
Registered: 02/19/04
Posts: 818
Actually, "page" does work, but only if it's > 1.
So, for example, this would bring us to page 2, which wouldn't have the "splash":
But then we lose page 1!
Even if we limit the stories to 1 per page, we still lose story #1.
And even if we are desperate enough to do that (we can just create a dummy story #1), we then lose the ability to have a featured story...
but who would want to have a 1 story per page anyway?
Then again, who said we have to create 1 dummy story...?
Still, this is too much work just to overide a little splash.
So, for example, this would bring us to page 2, which wouldn't have the "splash":
But then we lose page 1!
Even if we limit the stories to 1 per page, we still lose story #1.
And even if we are desperate enough to do that (we can just create a dummy story #1), we then lose the ability to have a featured story...
but who would want to have a 1 story per page anyway?
Then again, who said we have to create 1 dummy story...?
Still, this is too much work just to overide a little splash.
9
10
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
this doesn't seem to cause me any difficulty..
I have a staticpage set as a splash for a specific topic.
the link on the splash page takes me to the topic page 1 no problem.
pageformat = blank page
centerblock = unchecked
topic = some topic
and my link in the content area is simply:
<a href="domain.ca?topic=topicname">continue...</a>
works like a charm.
I have a staticpage set as a splash for a specific topic.
the link on the splash page takes me to the topic page 1 no problem.
pageformat = blank page
centerblock = unchecked
topic = some topic
and my link in the content area is simply:
<a href="domain.ca?topic=topicname">continue...</a>
works like a charm.
10
9
Quote
Status: offline
LWC
Forum User
Full Member
Registered: 02/19/04
Posts: 818
I don't think you understood.
What I want is that whenever someone clicks on
http://www.whatever.com/index.php?topic=General
then they will see a splash page and only then continue to the articles.
This is what centerblock (w/ entire page) is all about!
If I uncheck centerblock, like you said, than it ignores the position and topic fields!
That means I can only link to that static page manually (or through the menu) and http://www.whatever.com/index.php?topic=General
will just be the regular page without any splash.
What I want is that whenever someone clicks on
http://www.whatever.com/index.php?topic=General
then they will see a splash page and only then continue to the articles.
This is what centerblock (w/ entire page) is all about!
If I uncheck centerblock, like you said, than it ignores the position and topic fields!
That means I can only link to that static page manually (or through the menu) and http://www.whatever.com/index.php?topic=General
will just be the regular page without any splash.
8
6
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
yes, and you are right--the only concession that I had to make was to link to the page manually as you say.
using the menu plugin, I replace the topic link with the staticpage link.
so then i click, hit the splash, click again and go to the topic page.
am i still misunderstanding?
using the menu plugin, I replace the topic link with the staticpage link.
so then i click, hit the splash, click again and go to the topic page.
am i still misunderstanding?
6
10
Quote
Status: offline
LWC
Forum User
Full Member
Registered: 02/19/04
Posts: 818
So instead of the topics' block, you use the menu.
But does it mean you killed the topics' block entirely?
If so, that means you must make splash pages for ALL the topics!
And it sure wouldn't look nice in the menu as it would in the topic's block (plus you cause yourself a LOT more work AND you lose a lot of stuff like the # count).
If not so, then how do you make just the topic called, say, "General" dissapear? And then some of your topics are shown in the topics' block and some in the menu - isn't that confusing?
But does it mean you killed the topics' block entirely?
If so, that means you must make splash pages for ALL the topics!
And it sure wouldn't look nice in the menu as it would in the topic's block (plus you cause yourself a LOT more work AND you lose a lot of stuff like the # count).
If not so, then how do you make just the topic called, say, "General" dissapear? And then some of your topics are shown in the topics' block and some in the menu - isn't that confusing?
17
11
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
again, you are right, on that particular site I am not using the storycount or submissioncount so replacing the topics block with manual links in the menu didn't break anything. But I didn't have to make splashes for everytopic, the link simply goes to the topic rather than the static page. As far as the look of it goes, it looks just as it would if I used the menu's option to enable the topics block--just without any enabled counts. It's no more work than creating a link whenever I create a topic.
however, perhaps this would make a good feature request, i.e., the ability to disable a particular topic, or, like in this case, just the topic link--perhaps have a flag check in COM_showTopics() and a corresponding radio button or two in the topic editor. ...and/or the ability to replace a particular topic link with a different link, e.g., a staticpage link.
however, perhaps this would make a good feature request, i.e., the ability to disable a particular topic, or, like in this case, just the topic link--perhaps have a flag check in COM_showTopics() and a corresponding radio button or two in the topic editor. ...and/or the ability to replace a particular topic link with a different link, e.g., a staticpage link.
5
12
Quote
Status: offline
LWC
Forum User
Full Member
Registered: 02/19/04
Posts: 818
But your "click here to continue" link must be manual (you can't use my javascript example since you're not really inside that topic already). So if you change your topic's name, you also have to change that link.
The slick automatic procedure turns into a manual chore.
As for asking for a feature request, it brings up the question of whether it should be directed towards the static pages' plugin's author's or rather to the Geeklog system itself.
The static pages' plugin's author let us choose a topic + an entire page, but didn't think ahead, but it's Geeklog that wouldn't let topics use the $displayall parameter.
Personally, I think this problem could be fixed more easily in Geeklog (read: index.php) itself.
The slick automatic procedure turns into a manual chore.
As for asking for a feature request, it brings up the question of whether it should be directed towards the static pages' plugin's author's or rather to the Geeklog system itself.
The static pages' plugin's author let us choose a topic + an entire page, but didn't think ahead, but it's Geeklog that wouldn't let topics use the $displayall parameter.
Personally, I think this problem could be fixed more easily in Geeklog (read: index.php) itself.
15
13
Quote
Status: offline
LWC
Forum User
Full Member
Registered: 02/19/04
Posts: 818
Well, until I get an answer for this, I'd just mention that the "click here to continue" link can be automatic - as long as you make sure the static page and the topic share exactly the same ID!
If they do, the following would work
(yes, both with "url_rewrite" and without!):
<script>
url = document.location + ''
check = url.indexOf("index.php")
if (check != -1) {
if (url.charAt(check + "index.php".length) == "/") {
cutoff = "../"
topic = url.split("/")[url.split("/").length-1]
}
else {
cutoff = ""
topic = url.split("?page=")[url.split("?page=").length-1]
}
document.write('<a href="../../' + cutoff +
'index.php?topic=' + topic +
'">Click here to continue...</a>')
}
</script>
If they do, the following would work
(yes, both with "url_rewrite" and without!):
<script>
url = document.location + ''
check = url.indexOf("index.php")
if (check != -1) {
if (url.charAt(check + "index.php".length) == "/") {
cutoff = "../"
topic = url.split("/")[url.split("/").length-1]
}
else {
cutoff = ""
topic = url.split("?page=")[url.split("?page=").length-1]
}
document.write('<a href="../../' + cutoff +
'index.php?topic=' + topic +
'">Click here to continue...</a>')
}
</script>
8
11
Quote
All times are EST. The time is now 09:14 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