Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
wegorz23 Posted August 1, 2019 Posted August 1, 2019 Greetings, anyone of you knows how to acces those variables in IPS? I would like to see methods and attributes of those objects, I need that to change the functionality of Club Enhancements widget to automatically get user into the first topic if there is only one that exists in topics list, Thank you.
newbie LAC Posted August 1, 2019 Posted August 1, 2019 Hello, 2 hours ago, wegorz23 said: anyone of you knows how to acces those variables in IPS? Nohow if you don't have them in the template. These variables are not global. 2 hours ago, wegorz23 said: to change the functionality of Club Enhancements widget Why you don't ask creator?
bfarber Posted August 3, 2019 Posted August 3, 2019 Yeah I'm not really clear on what you are specifically trying to do, so I don't really know what to recommend here.
wegorz23 Posted August 6, 2019 Author Posted August 6, 2019 On 8/1/2019 at 1:55 PM, newbie LAC said: Hello, Nohow if you don't have them in the template. These variables are not global. Why you don't ask creator? What do you mean by template? Template.php? Actually this club thing I mentioned was not neccessary. I mean generally how to know what exactly $table or $headers methods do? How do get into them?
newbie LAC Posted August 6, 2019 Posted August 6, 2019 1 minute ago, wegorz23 said: What do you mean by template? 4 minutes ago, wegorz23 said: I mean generally how to know what exactly $table or $headers methods do? Variables not methods {expression="var_export($table, true)"} {expression="var_export($headers, true)"}
bfarber Posted August 6, 2019 Posted August 6, 2019 If you look at the top of the template file in your screenshot, you should see the following: <ips:template parameters="$table, $headers, $rows, $quickSearch" /> (or similar - I'm not 100% sure which template file you are editing) These variables are being passed in by the backend PHP code. You can inspect them as newbie LAC shows above by using var_export(). The values are going to be defined in the table helper's __toString() method (e.g. system/Helpers/Table/Table.php).
Recommended Posts
Archived
This topic is now archived and is closed to further replies.