Recent Topics On "Recent Posts" Page

Started by Nathaniel, September 22, 2008, 07:20:01 PM

Previous topic - Next topic

wendycroft

The only files that come with the mod are XML ones so I need to know which bit of XML to change. Shall I post the code here?

kat

I don't think that has anything to do with this mod, myself.

As I said, I think it's a Simple Portal block.

Either way, I think, whatever it is, it's pulling the name from the title of the "Job Postings" board.

Arantor

That's generated from the query that gets everything - you're only seeing the result HTML, but it's originally generated from the board where the topics are posted. Rename the board, it'll change the text.

wendycroft

Thank you, chaps, but I don't think I'll be able to convince the client to let me change the name of the board to "See more."

Arantor

In which case it'll be a rewrite of the mod of sorts - except that it's in a Simple Portal block, not necessarily using this mod... how exactly is that block set up in SP?

wendycroft

It's a mod that lets you change the Recent Posts news block to Recent Topics. It shows up in Blocks in Simple Portal. The best way to figure it out would be to install it on your own forum and work from there. You're the one with the brains.

Where's Nathaniel? As the writer he'd have the answers. I can't PM him because he'd delete it. He expects me to come here for help.

Arantor

Um, no, that's not how it works.

This mod modifies the master recent posts stuff, and does not interact with SP at all, so that block in SP is down to SP. (I know, I checked how the mod works.)

wendycroft

I'm a noob hoping for a cut and paste solution. What can I do? There's no way to change this thing in Blocks or SP.

Or is there? How can I change the text?

Arantor

So go into SP's configuration and take a look at the list of blocks that are defined and see exactly how that one block is set up...

wendycroft

Screenshots:

The blocks menu


The "Recent Topics" block menu



This is all I've got to work with. I thought the change would have to be made to the code. There's no opportunity to change it here and since you said you know how it works...

Arantor

Yes, the change will be to the code. Except the code concerned is not this mod.

I know how the mod works - the mod doesn't have the options provided by the screenshot you've shown me. It is going to be a code change to the depths of SP somewhere instead...

wendycroft

Where and how? I have no idea where to start.

wendycroft

New plan: I need to write a mod to do this. Since neither of you know how to change the mod as it is, and Nathaniel has dropped off the radar, how can I make one myself? I've only got XML files. Do I use those?

jack208

Has anybody had this mod working on 2.0.15? I've installed and it does not seem to work (still showing recent posts instead of topics). Nothing appears broken, and I checked the php files to confirm the edits were made (when the mod installed).

GigaWatt

If you're just looking for a mod that will show the recent topics, you could use this one. It hasn't received support for a while, but I can confirm that it works correctly in 2.0.15 ;).

Sorry, just checked, my mistake :P, the author is still pretty much active ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

jack208

Quote from: GigaWatt on July 18, 2018, 06:32:07 PM
If you're just looking for a mod that will show the recent topics, you could use this one.

Thanks GGWatt.

Yes I'd installed this mod earlier but it's doing something different to what I wanted. It does work on ver 2.0.15. It's showing a separate block of Recent Topics - so won't work with themes that are using the default Recent Posts block. It's also showing all 100 recent topics where I need to display only say the 10 most recent.

Pipke

Quote from: jack208 on July 18, 2018, 07:52:11 PM
so won't work with themes that are using the default Recent Posts block.

Why would it not work if thats enabled i dont get that part, it should just do the job.

Quote from: jack208 on July 18, 2018, 07:52:11 PM
It's also showing all 100 recent topics where I need to display only say the 10 most recent.

that is asked before on this msg it can be fixed with this msg
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

GigaWatt

Quote from: jack208 on July 18, 2018, 07:52:11 PM
Yes I'd installed this mod earlier but it's doing something different to what I wanted. It does work on ver 2.0.15. It's showing a separate block of Recent Topics - so won't work with themes that are using the default Recent Posts block.

Could you post a screen shot of what seems to be bothering you about the mod? Maybe a before and after one as well and how you'd like it to reflect on the theme ;).

Quote from: jack208 on July 18, 2018, 07:52:11 PM
It's also showing all 100 recent topics where I need to display only say the 10 most recent.

I understand, it kind of bothered me too that I can't set the maximum number of recent topics to display, but hey, Pipke posted a solution and besides, you could always set the number of topics per page to 10 and let the mod just list the rest of the "recent" topics on the rest of the pages ;). That's what I did :). Most of my members don't even notice that there is a page count in the recent topics section, trust me, it'll be like the page count doesn't exist ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

jack208

Hi Pipke, appreciate you popping in here and give me a reply! Firstly I hope that my comments earlier above is not meant to say your Recent Topics on BoardIndex mod is bad... in fact I was using it to list recent topics on our board when we were still using the Default Curve theme. :)

While it would be good to have limits of 10 topics etc, I'm fine with the paginations (though obviously reading your reply above, if there's a manual edit that can allow the max 10 items to be applied without needing to page 100 topics, that would even be better). Compared with the default Recent Posts block which appears at the bottom of the page and terribly formatted, your mod is definitely a step up (beside the point that it switches from Posts to Topics).

However I've just installed the STUDIO theme into the site; and that theme has nicely re-arranged the default Recent Posts block to the right-nav bar and properly formatted (see #2 in the attached pic) which I think is a huge improvement over the default style. The only issue I've now is that it's showing posts (it's default behavior) instead of topics. Hence my search for mod like this from Nathaniel that supposedly switch from posts to topics for the default Recent Posts block.

I've re-installed your mod - just to see how it looks/works with the STUDIO theme - and attached is the result. It still works nicely (programmatically), and it's adding a new section at the top of the page (which is how it is designed - just that it's not my use case). There are some styling issues  as you can see from the screencap but these are relatively minor and can be fixed if anyone really wants to use this mod with the STUDIO theme.

So back to TL:DR
- we are now using STUDIO as our default theme (and we are on ver 2.0.15)
- we like how they changed the default Recent Posts block and moved it up from the bottom of the page where it languished to the right-nav bar except... we want it to show Topics instead of Posts
- the Recent Topics on BoardIndex mod works on ver 2.0.15 and also in STUDIO theme (as in the attached pic, some minor CSS styling issues to resolve) but that's not what we were looking for (as it replaces the default block with it's own at-top-of-page block and does not fit in with the Studio theme).


jack208

Quote from: Pipke on July 19, 2018, 02:29:38 AM
Why would it not work if thats enabled i dont get that part, it should just do the job.

No, I meant the "default Recent Posts block" is not switching from posts to topics even after I'd installed this "Recent Topics on Recent Posts" mod; not your Recent Topics on BoardIndex mod. :P

Quote from: Pipke
that is asked before on this msg it can be fixed with this msg

Thanks for this tip. If I'm using back the Recent Topics on BoardIndex mod, I'll surely put this fix in as 10 recent topics are all we need. :) though as I've mentioned we were okay with leaving the pagination as-is as a workaround.

Advertisement: