|
Post by ragoflex on Feb 24, 2008 11:51:47 GMT -5
Hi there,
I'm a HUGE Grey Matter fan...have been using it for years. But, I have a request / question.
Is it possible to have more text fields to post different things? In other words, when you post an article now, you have:
SUBJECT MUSIC MOOD MAIN ENTRY TEXT EXTENDED TEXT
Is it possible to have another variable, or whatever, that lets you post an extra item of information?
Any help would be greatly appreciated.
Greg
|
|
|
Post by coldstone on Feb 26, 2008 18:32:41 GMT -5
Thats an interesting idea. Is there a particular field you are thinking of? It could be helpful to have more than 2 fields. Greymatter isn't picky though. If you don't want a Mood or Music, you can use them for whatever you want, since the templates would let you rename them (but the admin side of things would still call them mood and music).
|
|
|
Post by ragoflex on Feb 27, 2008 11:43:17 GMT -5
I already do use mood and music! I need more options now!
Basically, here's the set-up I currently have:
SUBJECT - I use for the article title
MOOD - I use to put in the URL for the story picture
MUSIC - I use to put in a very short tease sentence which appears on the site homepage
ENTRY TEXT - I use two write a tease paragraph which appears on the news page
MORE TEXT - I use for the bulk of the article
As well as the main blog, I get Greymatter to write content to a separate txt file which I incorporate into the site's homepage using .shtml
It all works fine (after much tinkering!). But it'd be really hand to have different fields. ..but I guess that would mean re-writing gm.cgi - and although I know my html and css, I don't know perl anywhere near well enough to even start thinking about that.
Just wondering whether any of the geniuses here might be able to help?
Appreciated
Greg
|
|
|
Post by coldstone on Feb 27, 2008 18:49:13 GMT -5
If you want to do it now, its a little more difficult then just modifying gm.cgi. You also have to alter libs/Gm_Storage to store and retrieve your new fields. And then you have to modify Core to associate them with new gm tags. And then modify gm.cgi to show them on the admin pages.
What other fields are you thinking of using? There is a trick you could use to get the Mood field back. If you always store the picture on your server, you could upload the image, and give it a name that matches the entry id. For example, you just wrote entry 4. So you upload the image as either 4.png or 00000004.png. Then in your templates instead of using the Mood tag, use like:
<img src={{entrieswebpath}}{{entrynumberpadded}}.png>
The gm_manual has the info on the available tags and you can get creative, but the trick above does have some restrictions.
|
|
|
Post by ragoflex on Mar 3, 2008 8:16:15 GMT -5
^^^ That's a clever idea. I might give it a go.
It'd be handy to have one or two extra text fields to enter different info...but if it means messing around with the cgi files then I'll leave it alone. As I said, I know my HTML and CSS, but that perl stuff is just beyond me!!
|
|