Welcome to Geeklog, Anonymous Wednesday, December 25 2024 @ 08:50 pm EST
Geeklog Forums
Comment Templates?
CodaX
I was wondering if there was any way to make a template for the comments. I would like to change the way they are displayed. I have been making a few themes and I keep running into things I can't change with the templates and instead of changing the main files then losing the code I put in when I update I thought it would be easier to do it with templates. I read the docs and such and it is not very clear on how to add new templates.
One more thing ... will hacking or changing the main files be a big problem when updating? I have added alot to GL since I first got it.
Thanks for your time.
Dirk
You are right, the code that formats comments is mostly hard-coded in Geeklog (in COM_comments() and related functions in lib-common.php). Some minor modifications are possible using CSS for the commentbar1, commentbar2, and commentbar3 classes, but the overall layout can not currently be changed.
Creating templates here is not that easy because of the different display modes for comments. However, I'm not too happy with the current situation there myself, so this may be something we should be looking into for Geeklog 1.3.7 (no typo - we need to get 1.3.6 finished first).
You may want to submit a feature request so this is not forgotten ...
Regarding upgrades: Yes, you will lose all your changes to Geeklog core files when upgrading. We recommend putting custom code in lib-custom.php if possible, because that is the only file that you can keep when upgrading - all the others are usually so intertwined that you really shouldn't try to keep any of them.
If you need to make modifications to Geeklog core files, it's probably a good idea to keep notes of what you changed.
bye, Dirk
epretorious
Dirk has a good point there. I always place a comment with my initials preceding the changes. e.g.,
// EVP - Added $_USER[username] so that $from will show username in form element
This way, when it's time to upgrade, I simply `grep -r EVP *` to find any/all the changes that I made.
Eric P.
Sunnyvale, CA
- 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