Posted on: 09/14/05 03:57am
By: Nygrah
I can not use these codes in story pages without getting errors. Can you please tell me what I'm doing wrong?
trying to you [staticpages:] in stories
Posted on: 09/14/05 01:51pm
By: Dirk
It would help if you gave us the error message and an example of what you're trying to do ...
bye, Dirk
trying to you [staticpages:] in stories
Posted on: 09/14/05 03:01pm
By: Nygrah
In the Body text portion of my story input boxes i put <a href="http://www.geeklog.net/staticpages/index.php/fest_news"></a> fest_news being the name of one of my staticpages.
When I go to view the page I get the following error:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE sp_id = 'fest_news'' at line 1. SQL in question: SELECT sp_title FROM WHERE sp_id = 'fest_news'
I am not sure how to use those extra codes such as ([code], <a href="http://www.geeklog.net/article.php/"></a>, <a href="http://www.geeklog.net/calendar_event.php?eid="></a>, <a href="http://www.geeklog.net/staticpages/index.php/"></a>
is there somewhere to get information on how they can work within the story format?
trying to you [staticpages:] in stories
Posted on: 09/14/05 03:13pm
By: Dirk
Hmm, I'm sure the forum did at one time let me post autotags within its CODE sections without interpreting them ...
The syntax for all autotags is (just imagine those being in square brackets [ ]): (tagname:id) where "tagname" is, for example, "staticpage" and "id" is simply an ID for the object to be displayed.
So to link to our static page about CVS, which has "cvs" as its ID, I would write (staticpage:cvs) and it would come out as
Anonymous CVS Access
Or to link to faq entry #42, I would write (faq:42) and it would come out as
Parse error in ...[*2]
And if I wanted a different text for the link, I simply add that after the ID: (staticpage:cvs How to use CVS) would become
How to use CVS[*1]
HTH
bye, Dirk
trying to you [staticpages:] in stories
Posted on: 09/19/05 02:30am
By: Anonymous (kcrothers)
I'm having a similar problem. I would like for the contents to be displayed within a story. I've used the code (staticpage:dangerfield) where the parens are actually brackets and I get the following error:
Mon Sep 19 02:25:06 2005 - 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE sp_id = 'dangerfield'' at line 1. SQL in question: SELECT sp_title FROM WHERE sp_id = 'dangerfield'
It looks like the table name is missing from the select. How can I fix this?
trying to you [staticpages:] in stories
Posted on: 09/19/05 03:11pm
By: Dirk
[QUOTE BY= kcrothers] It looks like the table name is missing from the select. How can I fix this?[/QUOTE]
There's a typo in /path/to/geeklog/plugins/staticpages/functions.inc in function plugin_autotags_staticpages:
$linktext = stripslashes (DB_getItem ($_TABLES['staticpages'],
'sp_title', "sp_id = '$sp_id'"));
should read
$linktext = stripslashes (DB_getItem ($_TABLES['staticpage'],
'sp_title', "sp_id = '$sp_id'"));
i.e. the table name is 'staticpage', without the 's'.
bye, Dirk
trying to you [staticpages:] in stories
Posted on: 09/19/05 11:27pm
By: Anonymous (kcrothers)
Got it! Thanks!
fyi - it's line 570 for me (version 1.3.11.sr1)