Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Midnight Modding Posted March 10, 2018 Posted March 10, 2018 Edit: after a lot of time researching and testing, I have figured out most of what I need, hopefully... One thing I don't understand, though, is that lists of topics have the topic title more bold if it's unread, but in the template topicRow, it doesn't seem to do any change to the title based on read status. Unless I am missing something it must be formatted elsewhere (maybe there's a getter for title in Topic.php? I haven't looked yet...)
Midnight Modding Posted March 10, 2018 Author Posted March 10, 2018 On a side note... the example I looked at had a "0 topics in this forum" title, but I see that wording nowhere on the forums. lol.
Midnight Modding Posted March 12, 2018 Author Posted March 12, 2018 Actually I do still have one question... Does Table\Db still have column headers on the front side? Or what if I have a page where I do feel like I should use headers above some columns, but not really be a table? Would I maybe use grids and the section header class (I forget the name without having it to look at....) or is there a class I don't know about that would be good for column headers? For Table\Content, it doesn't have column headers, it just calls the sort menu items headers, I believe. Anyway, I am mostly doing fine with the content table and I already tried Table\Db in the acp. I haven't yet got around to any other table type on the front end other than Content.
bfarber Posted March 12, 2018 Posted March 12, 2018 Regarding the topic title being bolded, on the <li> element we set this CSS class {{if $row->unread()}}ipsDataItem_unread{{endif}} If you need column headers, that sounds like a traditional table to me and you should probably output a table rather than a grid.
Midnight Modding Posted March 12, 2018 Author Posted March 12, 2018 Thanks. I didn't realize Table\Db is a legit table, but just inspected it and see it is. Maybe I should have even used that for my content item, but I see other content items use the Table\Content one, so figured I'd do so, as well. And now after learning all about it, I would hate to change that one. (plus obviously it has the built in sorting, filters, search setup, etc...). But in other areas I could use the Db one.
Tactical Geeks Posted March 13, 2018 Posted March 13, 2018 how do you use the table\db function ive tried and failed every time took example from admin logs and customized to my table and i error out trying to display on front end
bfarber Posted March 13, 2018 Posted March 13, 2018 IIRC (I'm going off memory here) there are no default theme templates for the table helper on the front end, so you have to define your own.
Adriano Faria Posted March 13, 2018 Posted March 13, 2018 6 minutes ago, bfarber said: IIRC (I'm going off memory here) there are no default theme templates for the table helper on the front end, so you have to define your own. Yeap. Otherwise you'll get a very known error message: https://invisioncommunity.com/forums/topic/417506-table-error-fatal-error-class-name-must-be-a-valid-object-or-a-string-in/
Tactical Geeks Posted March 13, 2018 Posted March 13, 2018 ive tried to make a template for table on front end but no luck and cant find one do you know where i can get a example?
Adriano Faria Posted March 13, 2018 Posted March 13, 2018 There are tons of it in the suite. Search in files for $table->rowsTemplate.
Adriano Faria Posted March 13, 2018 Posted March 13, 2018 Seacrh for what I’ve said in PHP files. You will see the template names then you go to DEV files.
Tactical Geeks Posted March 13, 2018 Posted March 13, 2018 wow that was to easy i feel stupid now sorry and thanks
Midnight Modding Posted March 14, 2018 Author Posted March 14, 2018 Anyone have any suggestions on how to make tables look decent within tabs? I did my tab setup like the new/popular questions one and that itself looks like a sort of table around the content. In some tabs I need to display a table of details and in one in particular I need to display multiple tables within one tab, too. I'm about to try to make a table of any sort just to get the data showing. I hate styling so much, but so far I am getting most things looking ok. I ahd already done a table and row template for the Content type, but not for a regular table yet. I assume Table\Db will work on the public sided, but we just flat out have to set the templates, right? edit: actually on the one where I needed multiple tables, I can maybe do those with a grid. But some tabs need one table to give details in (or I could do a bulleted list.... is there some styling built in for one?). If I do a table and use column headers, is there a good class for it that is a subdued color instead of the blue from the acp? Just as a note, though, for Table\Content, you don't have to define a table or row template. But that's not a true table and it was about unusable with the defaults.
bfarber Posted March 14, 2018 Posted March 14, 2018 You could specify the existing admin table templates, or copy them and use them as a base for your own.
Midnight Modding Posted March 15, 2018 Author Posted March 15, 2018 So I don't waste time needlessly, I hope someone can give an opinion on whether the following situation even warrant using the table helper to begin with. not a listing of multiple rows. it's details about 1 row only. so no sort options or filters needed, just dont know a good way of displaying it without it being a table. It's 5-10 details about a row, including status, times, etc... I would think there's a better way than a table or even if using a table, it probably wouldn't need the helper, due to being so simple.
Midnight Modding Posted March 15, 2018 Author Posted March 15, 2018 edit.... editing another out, trying to not be so wordy, as I figured out a lot of what I asked in this particular post, anyway.
Midnight Modding Posted March 15, 2018 Author Posted March 15, 2018 I'm trying to not have to keep posting so much, but wanted to mention that onlineUsers uses Table\Db on the front side and I don't understand why it uses includes and parsers when it's not using any automated table template, since it's on the front end, so it still requires manually doing the html for each column anyway. I'm asking in case I'm missing something. (noSort is another. It manually puts the sort options in, in the table template).
bfarber Posted March 15, 2018 Posted March 15, 2018 3 hours ago, Midnight Modding said: So I don't waste time needlessly, I hope someone can give an opinion on whether the following situation even warrant using the table helper to begin with. not a listing of multiple rows. it's details about 1 row only. so no sort options or filters needed, just dont know a good way of displaying it without it being a table. It's 5-10 details about a row, including status, times, etc... I would think there's a better way than a table or even if using a table, it probably wouldn't need the helper, due to being so simple. If you are only displaying one row, I don't think you need to use a table helper. That's really intended for displaying a table of data (i.e. the list of members in the AdminCP, a list of topics in a forum, things like that).
Midnight Modding Posted March 15, 2018 Author Posted March 15, 2018 5 hours ago, bfarber said: If you are only displaying one row, I don't think you need to use a table helper. That's really intended for displaying a table of data (i.e. the list of members in the AdminCP, a list of topics in a forum, things like that). Can you happen to think of a first party page that has a section of details (preferably in a tab, though)? I just can't think of an ideal way of presenting it. (I havent looked at calendar in ages, but would assume an event page would have some details and probably in downloads, but I dont own a license for that, plus need mine in a tab). Also, I basically copied the "About Me" html from the profile tab, but when I used it in my tab it didn't format it anywhere near like it does in the About Me tab. Are there other css files loaded sometimes for a lot of the first party apps where me simply copying the html is not going to have it work properly, due to missing files? Anyway, thanks again. I am getting close to figuring out all i need for the app, finally, and people such as newbie have helped me a lot where I know right where to look in files to see what is going on in a lot of situations, so in the long run I am going to know all of this in and out. Now just don't move up to 5.x for a while. lol.
bfarber Posted March 16, 2018 Posted March 16, 2018 Yes, sometimes you need additional CSS to display things in a specific way. Gallery loads its own CSS files when displaying albums in a user profile. You could look at some of the tabs in the report center or in the UserCP possibly.
Tactical Geeks Posted March 16, 2018 Posted March 16, 2018 ive been playing with table helper ive figure everything out except howto get filters to work only part im stuck on ;/
Midnight Modding Posted March 17, 2018 Author Posted March 17, 2018 9 hours ago, Tactical Geeks said: ive been playing with table helper ive figure everything out except howto get filters to work only part im stuck on ;/ I've set my filters and done the template part, but haven't tested to be sure it works. Just looking at examples it looks like basically it puts filter=someName into the url and $table->filters is an array of the possible filters where you set each possible filter to a where clause that I assume gets merged into the main where clause.
Midnight Modding Posted March 17, 2018 Author Posted March 17, 2018 17 hours ago, Tactical Geeks said: ive been playing with table helper ive figure everything out except howto get filters to work only part im stuck on ;/ are you using Table\Db? I see the problem with filters in mine is I check $table->count in the template, because some suite template i copied had that line in it (a Table\Content one), but Table\Db does not even store a $count value. I confirmed with var dumping that my filters are there. That count check is what is making them not show. Or maybe you just mean it's simply not working, as.... sigh.... I just tried it on mine after getting filters to show up and it just keeps showing all rows.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.