All Astronauts Posted December 15, 2019 Author Posted December 15, 2019 The thing is, I didn't. There are no template hooks of any kind in this plugin. All I do is provide a way to add an image to the category object, what you do with it is all on you. You have to manually add the images to your templates. And how do I use this? Images are stored wherever you have set the Pages Category Images file handler set to store them and you can access the image anywhere the $category variable is available to you in Pages templates. $category->pcimage = The local url to the stored image. You will rarely use this by itself as it will return "uploads/monthly_07/thisismyimagename_34erjfhrufhdheh.jpg" or something along those lines. {file="$category->pcimage"} = The COMPLETE url to the stored image. "https://myawesomesite.com/uploads/monthly_07/thisismyimagename_34erjfhrufhdheh.jpg". Just sticking this in a template will output that as a line of text. <img src='{file="$category->pcimage"}'> = The image will be displayed in your template at this location at full size. You get the idea. From here you can format the image with css, use it as a background element, and so on. AmericanRev2 1
AmericanRev2 Posted December 16, 2019 Posted December 16, 2019 (edited) delete Edited December 16, 2019 by fix3r
All Astronauts Posted December 16, 2019 Author Posted December 16, 2019 All good? Willing to lend a hand if needed. AmericanRev2 1
AmericanRev2 Posted December 16, 2019 Posted December 16, 2019 (edited) 4 minutes ago, All Astronauts said: All good? Willing to lend a hand if needed. can you tell me what css i need to add to my custom css to make the category images not over lap the text on smaller screens? https://www.mymilitia.com/intel/ and https://www.mymilitia.com/atlas/alabama/ i figure they should get smaller with the page or display inline dunno Edited December 16, 2019 by fix3r
All Astronauts Posted December 16, 2019 Author Posted December 16, 2019 Two things are at play here. We'll use Alabama and the State Parks sub cat as that has maps in it. First - both the State Parks line (title) and the 3 maps bit beneath, have a margin left on them to give room for the icon Second is of course the icon size itself. @media screen and (max-width: 979px) { html[dir="ltr"] [data-blockid="app_cms_Database_1382758328"] .ipsDataItem_icon:not( .ipsResponsive_hidePhone ):not( .ipsResponsive_hideTablet ) + .ipsDataItem_main, html[dir="ltr"] .ipsDataItem_icon:not( .ipsResponsive_hidePhone ):not( .ipsResponsive_hideTablet ) + .ipsDataItem_main + .ipsDataItem_stats { margin-left: 55px; } [data-blockid="app_cms_Database_1382758328"] .ipsDataItem_icon.ipsDataItem_category img { max-width: 45px; } } The above, on tablet and phone views, increases the margin left on those aforementioned bits from 45px to 55px. The second bit sets the size of the icon. The [data-block... provides targeting to ONLY this pages view. Without it this will spill over into all the other places in the suite that use those css bits. That's the above on phone view. Adjust as needed. If you need to adjust these cat images you are inserting as icons in other IPS databases you will need to change the [data-blockid... bit to what it needs to be for that block. You can spot it when inspecting the page with your browser tools. AmericanRev2 1
AmericanRev2 Posted December 16, 2019 Posted December 16, 2019 Thanks for your help the sub category looks great but the parent is not... https://www.mymilitia.com/atlas/ Dec-15-2019 21-50-41.mp4
All Astronauts Posted December 16, 2019 Author Posted December 16, 2019 Make this bit: html[dir="ltr"] [data-blockid="app_cms_Database_1382758328"] .ipsDataItem_icon:not( .ipsResponsive_hidePhone ):not( .ipsResponsive_hideTablet ) + .ipsDataItem_main, html[dir="ltr"] .ipsDataItem_icon:not( .ipsResponsive_hidePhone ):not( .ipsResponsive_hideTablet ) + .ipsDataItem_main + .ipsDataItem_stats { margin-left: 55px; } This: html[dir="ltr"] [data-blockid="app_cms_Database_1382758328"] .ipsDataItem_icon:not( .ipsResponsive_hidePhone ):not( .ipsResponsive_hideTablet ) + .ipsDataItem_main, html[dir="ltr"] .ipsDataItem_icon:not( .ipsResponsive_hidePhone ):not( .ipsResponsive_hideTablet ) + .ipsDataItem_main + .ipsDataItem_stats { margin-left: 55px !important; } Just add the !important AmericanRev2 1
Kingz Posted April 21, 2020 Posted April 21, 2020 Hi, i'm looking into making some graphics to use this application however I am unsure on what size landsacpe is required, does anyone know what size images are the minimum size that work?
All Astronauts Posted June 29, 2020 Author Posted June 29, 2020 Both Pages Searchable Text Fields and Pages Category Images are in the clear for 4.5 PCI will need a tweak to be available in the 4.5 marketplace as it piggybacks on the Pages database tables directly and IPS doesn't want that any more. It is perfectly fine to use with 4.5 as is though so no worries - upgrade away.
All Astronauts Posted August 23, 2020 Author Posted August 23, 2020 (edited) Pages Searchable Text Fields 3 submitted this afternoon. 4.5 compat, etc. etc. for all four of you using it. The current version you have is fine and works, but for the plugin to be in the ACP Marketplace I had to move my searchable flag off the Fields table into my own thing. Pages Category Images will get in the new ACP Marketplace eventually... (it's a larger pain in the ass then it should be for a variety of IPS reasons). Edited August 23, 2020 by All Astronauts Meddysong 1
All Astronauts Posted September 26, 2020 Author Posted September 26, 2020 Just an update on this for Pages Category Images. There is zero wrong with using what you have with 4.5, knock yourself out. That aside, I might just submit the old version and see if it will pass even though it does add a column to an IPS table - reason being that IPS does not follow the standards for loading categories consistently in Pages, meaning the standard hook point one would use to join a table on to the categories table is a no-go and I'm not sure I can slip by this without going way upstream and doing crap no one should be doing.
LiquidFractal Posted November 1, 2020 Posted November 1, 2020 I had PCI disabled on my most recent 4.5.x installation, but when I enable it (or even if I don't), and try to click through to its Marketplace entry I get a red-window error saying: "3C409/G This file is not compatible with the version of Invision Community you are using." So I assume this will interfere with updates at some point? But I'm getting that at least for now it works fine with 4.5.4?
All Astronauts Posted November 1, 2020 Author Posted November 1, 2020 It is not in the new marketplace yet so you will always get that error when trying to sync. Is it perfectly fine for 4.5 as is? Yes. Keep using it, no worries.
Zdeněk Tůma Posted February 16, 2021 Posted February 16, 2021 When I want save field setting in my custom databases causing this error: EX1054 Something went wrong. Please try again. UPDATE `cms_database_fields` cms_database_fields SET `field_validator`=false,`field_unique`=false,`field_required`=true,`field_html`=false,`field_display_listing`=true,`field_display_display`=true,`field_display_commentform`=false,`field_pstf_searchable`=true WHERE field_id=21 IPS\Db\Exception: Unknown column 'field_pstf_searchable' in 'field list' (1054) #0 /var/www/html/105128/system/Db/Db.php(1161): IPS\_Db->preparedQuery('/*o283304::o283...', Array) #1 /var/www/html/105128/system/Patterns/ActiveRecord.php(520): IPS\_Db->update('`cms_database_f...', '`field_validato...', 'WHERE field_id=...') #2 /var/www/html/105128/system/Node/Model.php(2389): IPS\Patterns\_ActiveRecord->save() #3 /var/www/html/105128/applications/cms/sources/Fields/Fields.php(2794): IPS\Node\_Model->save() #4 /var/www/html/105128/system/Node/Model.php(3314): IPS\cms\_Fields->save() #5 /var/www/html/105128/system/Node/Controller.php(413): IPS\Node\_Model->saveForm(Array) #6 /var/www/html/105128/system/Dispatcher/Controller.php(90): IPS\Node\_Controller->form() #7 /var/www/html/105128/system/Node/Controller.php(62): IPS\Dispatcher\_Controller->execute() #8 /var/www/html/105128/applications/cms/modules/admin/databases/fields.php(48): IPS\Node\_Controller->execute() #9 /var/www/html/105128/system/Dispatcher/Dispatcher.php(152): IPS\cms\modules\admin\databases\_fields->execute() #10 /var/www/html/105128/admin/index.php(14): IPS\_Dispatcher->run() #11 {main}
All Astronauts Posted February 16, 2021 Author Posted February 16, 2021 It's missing the pci column in the table. Not sure where you got your copy from... (cough) Anyways, it's been a been awhile, I'll poke this today to see if I can find a way to get this up to true 4.5 compatibility. It's fine if you got this from the MP but with the IPS MP rule to not allow cols on their own tables anymore, as mentioned further above, there are some hitches with Pages to get around that.
Zdeněk Tůma Posted February 16, 2021 Posted February 16, 2021 36 minutes ago, All Astronauts said: It's missing the pci column in the table. Not sure where you got your copy from... (cough) I just install from MP in AdminCP.
All Astronauts Posted February 17, 2021 Author Posted February 17, 2021 (edited) You don't show in the list of downloaders at all, and it's not flagged 4.5 compatible so it doesn't appear in the ACP MP. @Daniel F am I missing something here? Weird MP quirk? Edited February 17, 2021 by All Astronauts Zdeněk Tůma 1
Zdeněk Tůma Posted February 17, 2021 Posted February 17, 2021 You are mad? Just from your plugin forced me to upgrade my site to 4.5
All Astronauts Posted February 17, 2021 Author Posted February 17, 2021 Oh Searchable Text Fields, not Category Images. My bad. Looking.
All Astronauts Posted February 17, 2021 Author Posted February 17, 2021 Ugh. I know exactly what this is. Hang on...
All Astronauts Posted February 18, 2021 Author Posted February 18, 2021 Submitted, verified working on my own sites. Sorry bout that. Zdeněk Tůma 1
All Astronauts Posted February 19, 2021 Author Posted February 19, 2021 3.0.0 was released and it does solve the problem but someone brought an edge case to me so there is a 3.1.0 coming down the pipe. Submitted, approved and available when it's available. Seems there is a tiny hitch when people would create a field but ignore the 'Searchable' tab completely and just hit save. Didn't feel like tracking it down the rabbit hole so just moved the searchable field to the bottom of the first tab and removed my searchable tab completely. Also added a burn-it-all-down option, a few language tweaks, etc. FIX! Moved the form field for PSTF to resolve hitch when people just save the form without visiting the previous 'Searchable' tab in the form CHANGE! Database titles used instead of keys in plugin rebuild search indexes options. NEW! Option to wipe out all settings for searchable fields and start over, or not.
All Astronauts Posted June 30, 2021 Author Posted June 30, 2021 Pretty sure its fine as is. Apologies for anyone not getting responses to PMs here. I'm... behind. As to this, I need to take another run at this. The problem is IPS will NOT allow any columns added to their own tables any more. Period. Full stop. I have this fixed for Pages for record view, and category view (I think - been awhile). But database index view is a problem as they do not active record that stuff. Its a direct database query. I get a little leery the further up I go, getting closer to lower level functions, for hooking and changing things. I probably shouldn't worry; I usually bullet proof stuff enough anyways to not spill over. But this is not as simple as slipping into the AR routines as Pages is messy in this regard (probably because the entire thing is an abstraction itself) Anyways, I'll poke this bear. FYI most of my junk was updated to 4.6 but IPS staff are back-logged with MP approvals so might still be awhile. Jimi Wikman and Chris59 1 1
Recommended Posts