Wedge
Public area => Bug reports => The Pub => Archived fixes => Topic started by: Arantor on March 29th, 2012, 01:44 AM
-
I can edit and remove any thoughts (being an admin here) from the front page, but on an SVN copy I only ever seem to be able to get the 'reply' button to appear.
Digging through the code, it seems to be testing for data-self to be added but the SVN Welcome template does not seem to have this, or maybe it's late and I'm just missing something fundamental >_>
-
I was trying to add hooks to thoughts, but I'm a bit concerned by a few things. Namely that we're querying the table to get the 'last thought id' for removal, then querying using that but apparently it's in user's data as a string (i.e. $last_thought is returned as the thought id, but is injected into the string for lookup in user data as if it's the thought text)
I'm also not entirely clear what the best parameters to send to a hook are, either.
-
For adding a thought hook I'd want id_thought, id_member, id_parent, id_master, privacy and thought itself(Basically anything passed by the user). I'd think that same parameters should be passed for editing and deleting? So that one hook callback doesn't have to perform a lookup if required.
PS: What's the difference between id_parent and id_master?
-
As a reminder, Home.template.php is what I'm using on Wedge.org, but it's a custom homepage.
The official homepage, Welcome.template.php, will eventually be using 80% of the code from Home, and is currently *broken* when it comes to thoughts I'm pretty sure of it.
The easy workaround is to simply add 'default_index' to your settings table, and set it to 'Home'.
To answer Shitiz's question, id_parent is the ID of the thought that you're repying to. id_master is the ID of the thought that started the thread. Among other things, it determines in what profile area the thought will appear when you want to read a thought thread in context. (i.e. by clicking the @Name...)
-
It is currently broken when it comes to thoughts, which is why this got posted :P But now that I know that, I can change that and it'll let me make some sense of implementing hooks for thoughts when I get around to it (unless you want to?)
-
When it comes to moving Home to Welcome, I guess I'd rather do it. But you're welcome to do it and I'll get to complain later, eheh. No, seriously, I don't mind, do it if you want. Just make sure to fix my crappy code and make it more MVC ;)
Odd little thing. This topic didn't have any "new" anchor when I visited it. (It was my first visit and it had all 3 entries above.) It's working now.
-
I'm in the middle of going through other bugs, so adding new hooks isn't really what I wanted to do, ahahha. In my case I was only going to do it temporarily so that I could work on the thought hooks, but nothing more than that.
-
Since the file in SVN now matches what's here, it all works.