Developer Connection
Use this forum to interact with our development team on technical issues, suggestions and official best practices advice.
1,734 topics in this forum
-
- 1 follower
- 4 replies
- 719 views
Hi guys, I'm trying to create a quote of the day Pages block to show at the home page. I have a Pages database with many quotes already and I'm able to visualize on my home page one quote. However, the block refreshes whenever caching time is over and I want it to refresh the text and pull a random quote one time per 24 hours only. In previous versions of IPS it was possible to control the caching time per block, but now it is not as long as I see. Is this correct? How can I somehow make it refresh only one time per 24 hours / day? Any extra code to put in the template for the block or something? Or any other suggestions to make this work preferably via a b…
Last reply by Matt, -
- 1 follower
- 4 replies
- 791 views
Hi if anyone can help please. I've an urgent requirement to change file submit / updated detail of a file. So I thought it may be done from backend easily. But as I can see in db table the date is not in usual format. What is the mechanism to change this ?
Last reply by Pushpendra Singh Chauhan, -
- 1 follower
- 0 replies
- 509 views
I wrote News application, but can not find how I can add /news/* to sitemap. Pls help.
Last reply by Bazilisk, -
- 2 replies
- 430 views
Is there a way to create a fee that doesn't show in the store but is added to each order at check out?
Last reply by jderek01, -
- 3 followers
- 8 replies
- 1.3k views
I understand that Memcache will be depreciated in IPS 4.6. But what methods of caching are going to be available instead? From what I understand, only redis caching is available now. But you can't use redis with a MySQL database. I have Cloudflare... will that be enough? Advice?
Last reply by Terry Ellison, -
- 7 followers
- 10 replies
- 1.3k views
Hey there! I have several advertisements blocks and also blocks widgets that can load these advertisements. I was wondering... Can I use the {block="myblock"} or {advertisement="myad"} inside a page content? How do you resolve this thing? Cheers, Ibai
Last reply by 403 - Forbiddeen, -
- 1 follower
- 0 replies
- 415 views
Hi IPS, In the recent update update I noticed you upgraded CKEditor to v4.16.2, the latest version. That's great but it brings about some theming issues. I have previously included Moono Dark in my dark theme, but it's now outdated and no longer compatible. As part of the 4.16 series, they have changed their default theme to the much more modern looking Moono-Lisa. This means because it supports the internal chameleon code, it supports the hugely convenient uiColor config setting, to quickly change the color of the editor, either on the front end per user or globally. https://ckeditor.com/docs/ckeditor4/latest/examples/uicolor.html There is a butt…
Last reply by The Old Man, -
- 1 follower
- 1 reply
- 368 views
My app uses a map table for mapping containers to items. I'm trying to implement having an item be contained in multiple containers. I've got this mostly working by adding an INNER join of the map table when calling getItemsWithPermission(). But, I now want to select other columns in the joined map table and on return from getItemsWithPermission(), I want to access the joined map table column data within my Item Class. How do I access the map.* column data? $joins[ 'map' ] = array( 'select' => 'map.*', 'from' => array( 'myapp_forum_topic_map', 'map' ), 'where' => array( 'myapp_topics.tid=map.topic_id AND ' . \IPS\Db::i()->in( 'ma…
Last reply by KT Walrus, -
- 5 replies
- 799 views
Where would I use this, any sample code?
Last reply by OctoDev, -
- 1 follower
- 2 replies
- 586 views
Hi All, I have a custom PHP block that I'm working on. Question: How do I retrieve the user's Display Name from PHP? Thanks
Last reply by gigantor, -
- 0 replies
- 1.8k views
IPS 4.6.8 is going to remove following extensions: core/extensions/core/Sitemap/Applications.php core/extensions/core/Sitemap/Profiles.php So if your 3rd party applications or plugins hook into any of these files, please be warned. Everything else 3rd Party related from our changelog: I'm really excited about the last point. Now you're be able to set a member group as not deletable, to prevent that a group which is used for member promotions, or which is literally essential for your 3rd party code can be deleted by the admin. /** * Can this group be deleted? * * @param \IPS\Member\Group $group The group * @return void */…
Last reply by Daniel F, -
- 1 follower
- 4 replies
- 799 views
I have created Page CSS. It works on the page with database. Now I would like to include it into custom block (Plugin) based on this database. This does not work: {{\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'myfolder/general.css', 'cms', 'front' ) );}} And using a template plugin, I get 'ErrorException: template_store_missing (0)': {template="includeCSS" app="cms" group="myfolder/general" location="front" params=""} Is there any other idea of how to include Page CSS in the block or other templates? Note: I do not have any app or plugin. This is just a simple Pages database.
Last reply by Sonya*, -
- 3 followers
- 9 replies
- 982 views
Hi, I've been trying all week to get this to work, but it always shows as unparsed text. I have a custom theme setting with a list of radio options to choose from, each one is a font awesome icon. It works great but I'm trying to display the actual icon by each checkbox. I have tried using lang settings, tried adding a prefix, description, php in double brackets, targetting with CSS etc. The AdminCP won't parse anything I enter into the value fields for each key except as text. The individual fields don't have seperate ID's, they all have the same one. Can anyone please nudge me in the right direction, so I can display the actual icon next to each? …
Last reply by The Old Man, -
- 3 followers
- 4 replies
- 915 views
I have defined a multiple Upload field in a Pages database for images only. I would like to display the images in carousel and need thumbs and original locations. I have tried this: {{$images = $record->customFieldDisplayByKey('images', 'raw') and $thumbs = $record->customFieldDisplayByKey('images', 'thumbs');}} But this does not work as the order of thumbs and images does not match. This is the order of the images in cms_custom_database_3 in field_10 monthly_2021_10/lake-6641880.jpg.eb13d74004f9c2719eecf920c705eaea.jpg, monthly_2021_10/redwood-national-park-6667452.jpg.f024a0c23e256de59503715f6a5809db.jpg, monthly_2021_10/forest-6631518.jpg.18a05d8e1196c48…
Last reply by opentype, -
- 1 follower
- 2 replies
- 952 views
Hi, I need to ask if possible and how to put the login username variables in a custom html page. I can't find how to do this? Any help?
Last reply by Daniel F, -
- 6 followers
- 18 replies
- 3k views
On my localhost, with php 7.4 i have E_ALL enabled, and if i am not in_dev mode, my theme hooks for my toolbox app causes this error: Cannot use “parent” when current class scope has no parent i've tracked it down to the hookData() method: public static function hookData() { return parent::hookData(); } i've been able to correct it with this code: public static function hookData() { if (is_callable('parent::hookData')) { return parent::hookData(); } return []; } now i am not entirely sure why i have to do this, it only seem to have started with 4.6 (maybe its a change i'm unware of, but i am…
Last reply by HelloWorld, -
- 2 followers
- 2 replies
- 1.3k views
Hello dear Invision team. Ever thought about releasing an official docker solution that could work out of the box? That would definitely be a nice modern addition for everyone on the self-hosting license.
Last reply by Jonas Erlandsson, -
- 2 followers
- 3 replies
- 1.1k views
In Invision Community, you can use either your name or email to log in by default. Invision Community does not have the concept of Username and Display name - There is just simply 'Name'. However, in my community accounts are created from a game where people have Display Names (Not unique) and Usernames (Unique). Ideally I'd like to use the Display name as the 'Name' that shows up above people's profiles and can be searched on, mentioned etc, but still have the user log in with their username. Something like this possible?
Last reply by A Zayed, -
- 1 follower
- 1 reply
- 496 views
Hey peeps, How can I contruct an if statement within the Core > Front > Global > Tag template that accomplishes the following: IF $member_id is ( x OR y ) AND $tag is ( 'this' OR 'that') $tag (displays tag) ELSE Don't display $tag (I guess just leave this part blank and nothing will be displayed. In a nutshell, as the tag template is called, I want to show certain tags only to certain members, all other tags are shown to everyone. Thanks for any help!
Last reply by Marc, -
- 1 follower
- 6 replies
- 987 views
i got this error after upgrading to 4.6.7 -> `IN_DEV' mode Error: Access to undeclared static property: IPS\Application::$ipsApps (0) #0 ...\system\Theme\Dev\Template.php(171): IPS\Theme\theme_core_admin_applications_appRowDescription(Object(IPS\core\Application))
Last reply by Daniel F, -
- 1 reply
- 636 views
I have made a PHP Script on my invision installation to bring back the newest events using the REST API and display them to the user. The trouble is that the API brings back all events, including events that are not relevant to a given user. I know the user id prior to making my request. My installation does not currently use oAuth. I wonder if there is some way I could query the database rather than use the REST API to avoid having to set up oAuth as that appears to be quite involved. Failing that, is there a barebones way I could let a php script impersonate a user using oAuth?
Last reply by Daniel F, -
- 1 follower
- 0 replies
- 404 views
I noticed that search engines index pages like this: https://invisioncommunity.com/profile/543491-jim-m/?do=hovercard https://invisioncommunity.com/profile/4-somkiat_bangkok/?do=hovercard
Last reply by SeNioR-, -
- 1 follower
- 0 replies
- 498 views
I uploaded a profile image, an animated gif, the library for manipulating the image is GD, when I chose cropping, it gave me an error: ValueError: imagecolorsforindex(): Argument #2 ($color) is out of range (0) #0 /var/www/vhosts/**.it/httpdocs/system/Image/Gd.php(298): imagecolorsforindex() #1 /var/www/vhosts/**.it/httpdocs/applications/core/modules/front/members/profile.php(1487): IPS\Image\_Gd->cropToPoints() #2 /var/www/vhosts/**.it/httpdocs/system/Dispatcher/Controller.php(90): IPS\core\modules\front\members\_profile->cropPhoto() #3 /var/www/vhosts/**.it/httpdocs/applications/core/modules/front/members/profile.php(73): IPS\Dispatcher\_Controller->execute(…
Last reply by Askancy, -
- 2 replies
- 2.1k views
I am trying to edit the value of a users custom profile field via the REST API, but the documentation is as clear as mud to me. This probably seems obvious to someone used to dealing with form data etc. But I have no idea how an array is sent in form data. So I make a post request to this endpoint POST https://example.com/api/core/members/4?key=<my_api_key> What would the raw body look like if I wanted to say set customField ID 3 to 'Foo' and field 4 to 'Bar'? Could someone just show me what the body would look like so I have some idea of what I'm aiming for here...
Last reply by IPCommerceFan, -
- 1 follower
- 0 replies
- 426 views
There is a bit of mess with ratings and reviews in databases and sorting by Highest rated. We have 5 fields in tables cms_custom_database_X related to reviews and rating: rating_real rating_hits rating_value rating_reviews record_rating Depending on what we allow on database, they are filled or not. Case 1: Database allows stars rating (no reviews) rating_real -> not used rating_hits -> number of votes rating_value -> total stars (e. g. 1x4+2x5 = 14) rating_reviews -> not used record_rating -> average number of stars Case 2: Database allows reviews (no star rating) rating_re…
Last reply by Sonya*,