The Britain Posted September 8, 2017 Posted September 8, 2017 I've dropped a custom html and/or php block on a page, I want to pull all the first post, of all the topics in a specific sub-forum, and display them on a page like a news feed. I want to parse them so they display just like they do in the forums. So I assumed I could just access a set of php or blade(whatever IPS calls it) functions and pull the info I wanted from the database. I can not find good documentation for what I'm trying to do. Am I just overlooking it? Alternatively, direct me to what files I can examine for the forums, so I can learn off those.
opentype Posted September 8, 2017 Posted September 8, 2017 52 minutes ago, The Britain said: Alternatively, direct me to what files I can examine for the forums, so I can learn off those. The topic widget in the theme or (if you have Pages) the topic block templates there.
The Britain Posted September 8, 2017 Author Posted September 8, 2017 That's not what I'm looking for. I need the ability to code custom solutions as blocks (and also the topics displays a list of click-able topics, I want to display the whole parsed first post of each topic, not the topic itself). I need the documentation for coding in IPS using blocks. The PHP documentation doesn't really get me where I need to be, and I can't find good documentation on the implementation of IPS scripting.
opentype Posted September 8, 2017 Posted September 8, 2017 12 minutes ago, The Britain said: I want to display the whole parsed first post of each topic, not the topic itself). That’s still doable just with the regular blocks. You just need to call the topic content. No manual queries necessary. {$topic->content()|raw}
The Britain Posted September 8, 2017 Author Posted September 8, 2017 2 hours ago, opentype said: That’s still doable just with the regular blocks. You just need to call the topic content. No manual queries necessary. {$topic->content()|raw} Hey I really appreciate the help. I see what you're getting at. Where could I find documentation on this? Clarification, this documentation below doesn't seem to be what I'm looking for. I will try and play with that function when I get home tonight and see how I can make it behave. Where could I find documentation on this specific function for instance? Thanks a million for your help.
The Britain Posted September 8, 2017 Author Posted September 8, 2017 6 hours ago, opentype said: That’s still doable just with the regular blocks. You just need to call the topic content. No manual queries necessary. {$topic->content()|raw} "Fatal error: Call to a member function content() on null in C:\xampp\htdocs\afnew\system\Theme\Theme.php(4290) : eval()'d code on line 8" I'm a little bit stumped on how to use this within my custom html block on pages. Am I missing a step? I was going to try and dump this to see what it was pulling and go from there, but simply putting it on the page has caused it to error out.
opentype Posted September 9, 2017 Posted September 9, 2017 5 hours ago, The Britain said: I'm a little bit stumped on how to use this within my custom html block on pages. You don’t. It’s a variable available in the regular topic feed block – which I keep saying you could just use and modify.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.