Welcome to Geeklog, Anonymous Saturday, December 28 2024 @ 09:44 am EST

Geeklog Forums

Topics Within New Blocks


Status: offline

Wyoming

Forum User
Junior
Registered: 09/29/06
Posts: 27
Hi Folks, I hope the answer to this question isn't too obvious but I'm just a rancher here in the high plains of Wyoming so I may be missing something silly. I apologize in advance if I am. I've searched this site high and low but at times can't see the trees for the forest.

I want to create new blocks that list stories (topics?) specific to that new block exactly like what heppens in the standard "Topics" block. Creating the new block is no problem and I have figured out that each new block needs a script associated with it calling the information I want.

And that's where I'm struggling. I can't for the life of me find where the scripts live. I figure that if I can find the script for the topics block that I can muddle through copying and modifying it for my new blocks.

So my question is where do these scripts live and am I on the right track thinking that I can modify an existing script to perform the functions for my new blocks?

Maybe I should stick to growing livestock - they're a lot simpler. Except as near as I can tell, PHP can't maim me. Rolling Eyes

Glenn
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
PHP can not maime you directly but there have been a few assults resently Shocked

Let me see if I can steer Razz you in the right direction.

You will need to create a new block of type 'php' where you reference a php function that is defined in your system/lib-custom file.

Are you looking for a block that shows the most recent story titles for a particular topic or all topics or just the topic names?

The current topic block is defined in lib-common.php - it;s called COM_showTopics

Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

Wyoming

Forum User
Junior
Registered: 09/29/06
Posts: 27
Thanks, Blaine - especially for the reference to COM_showTopics.

I want all topics shown in a block, not just most recent or most viewed or anything.

This is just a simple site for a Stock Dog club and many of our viewers are hicks like me, so I want to make it as simple to navigate as possible. So for example, I want a block titled "Trial Results" with links to the individual trial results listed below. I don't want all trial results to fall under an individual topic where they will get buried (and trust me, many of my viewers will not be able to figure out the scheme..... Just remember "hicks.")

Does that make sense?

There may be a more logical way of going about it, but as far as I know GL this would be the easiest way to accomplish it that I can think of. I f there's a better/easier way I'm all ears.

Thanks, again for your help. I have to go out and put a roof on a barn. I'm better qualified for that..........

Glenn
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
Still don't follow completly so want to review terminology being used.

Topics are Story Topics correct - how many do you have today?

Your wanting to show the Titles for Stories in these topics - correct?
How many stories will you have (total and per topic) - estimates ?

Is this a block that will show on the left or right side - will it not get very long with a listing of these topics if you don't restrict then by topic, most recent or limit of X number.

Sounds like your looking for more a modified version of the WhatsNewBlock.


Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Yeah, I too think there's some confusion about the terminology here.

A topic in Geeklog is more like a folder/directory on your hard drive. A story would then be a file within that folder. Or maybe thinking of a "category" for the word "topic" makes it clearer.

Anyway, I think you're looking for something like the stories by topic block.

bye, Dirk

P.S. Blaine, I think you meant to write "lib-common.php" above, not lib-custom.php
[edit] Thanks Dirk - fixed [/edit]
 Quote

Status: offline

Wyoming

Forum User
Junior
Registered: 09/29/06
Posts: 27
Sorry for the terminology problems. My fault, no-doubt.

I want to have a Block (Trial Results) followed by Topics (National Finals Results) and want the user to be able to click on that topic and see a single Story.

****************************
{Block} Trial Results
****************************
2006 National Finals
Powderhorn Classic
Meeker Classic
Bluegrass
****************************
Where there will be a single story for each topic in the block as opposed to a long list of stories under a topic of Trial Results. So for each set of results I would create both a topic and a single story associated with that topic.

I don't anticipate that these blocks will have too terribly many topics within them, that's why I thought I could get away with doing it this way. For example, trial results are really only interesting for a short time after the trial ends, so each would have a lifespan of perhaps a month before they're archived or ditched or whatever and we have only about a dozen trials per year.

Dirk - Thanks, I'll check out the stories by topic block and see what that's all about. I did figure out Blaine's transposition of lib-custom for lib-common and found the code he was describing.

Thanks for sticking with me.

Glenn
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
If the block only has a few required links, you may look at creating an HTML only block with the links. If the links would not change that often, editing the HTML block in the block editor to reflech the new topic id would be easy enough.

No PHP or potential bodily harm then risked.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

Wyoming

Forum User
Junior
Registered: 09/29/06
Posts: 27
Quote by Blaine:No PHP or potential bodily harm then risked.

My body will be fine, it's my "living in the 19th century" pea brain that's at risk.

I looked into HTML only blocks and need to learn more about them. I'm sure my questions are answered here already, I just need to figure out what my questions are....... Embarassed

Thanks, again. You are helping more than it might seem at the moment. I see some natural Wyoming jalapeno and lamb summer sausage in your future.

Glenn
 Quote

All times are EST. The time is now 09:44 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