Developer Connection
Use this forum to interact with our development team on technical issues, suggestions and official best practices advice.
1,736 topics in this forum
-
- 1 follower
- 2 replies
- 487 views
There appear to be limitations on the plugins hook system vs application hook system. For example, setting the default tab on profile view. The following works with an Application. Extending \IPS\core\modules\front\members\profile. Ultimately, the manage() method looks to see if a tab has already been set. If so, display it. Using the below, I can modify the request parameter for tab and set it to what I want. protected function manage() { try { if(\IPS\Settings::i()->steam_default_tab && !isset(\IPS\Request::i()->tab)) { \IPS\Request::i()->tab = 'node_steam_steamprofile'; } return parent::manage(); } catch ( \Ru…
Last reply by Aiwa, -
- 2 replies
- 320 views
How to add fonts to theme?
Last reply by Inlens, -
- 2 replies
- 374 views
My site has been having terrible errors for almost a week and is unusable. I've had my host roll back to an older version of my site but the errors keep happening. People can't log in properly, they log in as the wrong person and it's just a mess. As IPB3 is unsupported I can't get any help from the IPB team so I'm reaching out to see if anyone can help me. I'm willing to pay for your help! I have skype and discord to discuss things.
Last reply by bfarber, -
- 2 replies
- 372 views
Hello, everytime I turn on the dev mode the forum itself stays "blank" and the ACP gives me the following error message when trying to login Whoops \ Exception \ ErrorException (E_WARNING) Missing argument 7 for IPS\Theme\theme_core_admin_dashboard_dashboard()
Last reply by bfarber, -
- 3 replies
- 442 views
I'm adding suport to Rest API in my resources and I'm facing a issue in the categories. I always get the error: MySQL 1054 is unknown column in 'Field List' so debugging I see the error comes from IPS\Node\Api\NodeController_list(): protected function _list( $where = array() ) { $class = $this->class; /* Return */ return new \IPS\Api\PaginatedResponse( 200, \IPS\Db::i()->select( '*', $class::$databaseTable, $where, $class::$databaseColumnOrder ? $class::$databaseColumnOrder . " asc" : NULL ), isset( \IPS\Request::i()->page ) ? \IPS\Request::i()->page : 1, $class, \IPS\Db::i()->select( 'COUNT(*)', $class::$databaseTable, $…
Last reply by Ryan Ashbrook, -
- 0 replies
- 385 views
Now, system prevents me from using Stack field type with Key/Value in theme settings by last line in below code: system/Theme/Theme.php line 2022 $save = array(); $json = array(); foreach( $themeSettings as $settingId => $row ) { if ( array_key_exists( "core_theme_setting_title_{$row['sc_id']}", $values ) ) { $field = $this->getCustomSettingField( $row, TRUE ); $stringValue = $field::stringValue( $values["core_theme_setting_title_{$row['sc_id']}"] ); // THIS If we use \Form\Stack with Key Value we get associative array, and stringValue doesn't consider this case. Array, Array, Array, …
Last reply by IPBaddons, -
- 7 replies
- 460 views
Hello guys, I'm trying to modify my gallery theme. I just want to add a centred button under each photos. {{foreach $images as $image}} <li class='ipsGrid_span4 data-role='patchworkImage' data-json='{$image->json()|raw}'> <div data-grid-ratio='65'> <a href><img src=... alt='' class='cGalleryThumb'> </a> {{if $table->canModerate()}} [...] </div> <ul class='ipsList_inline ipsType_medium ipsClearfix'> [...] </ul> </li> <!-- WHAT I ADDED--> <li> <a href='www.google.com' class='ipsButton ipsButton_over…
Last reply by bfarber, -
- 1 follower
- 0 replies
- 328 views
Two small backend additions that will not impact any existing code/apps but would be nice to have added for 4.3 (pretty please with beer on top?) 1) Google Maps render function needs updating. The sensor parameter is no longer needed at all and can be removed. Circa 2014-sometime this was axed. public function render( $width, $height, $zoom=NULL ) to public function render( $width, $height, $zoom=NULL, $scale=1, $maptype='roadmap', etc...) https://developers.google.com/maps/documentation/static-maps/intro#quick_example $scale is needed as static maps api is limited with scale 1 to a maximum of 640x640 pixel images. If we pass $scale = 2 we get th…
Last reply by All Astronauts, -
- 1 reply
- 291 views
Hi, I want to add validation to the custom profile field input. Where would I go about doing that? Do i need to hard code some form of validation directly into the template, or could I get away with using the "unique" field type in the db? Any insight would be greatly appreciated! Cheers
Last reply by Adriano Faria, -
- 8 replies
- 345 views
It may seem a stupid question but I really don't remember if there's a way. Long story short: I have a task that creates a topic and the post content is using the ACP language set which is different from the public side. User uses French in public side and English on ACP. As task runs on ACP, it is using English on posts. I can change a language but it's a per member basis and it is a task, not a member firing the action. \IPS\Member::loggedIn()->acp_language = $id; Is there a way to set the public side language in the task?
Last reply by Adriano Faria, -
- 1 reply
- 310 views
I'd like to "embed" the structure of a topic for an external piece of content. Would it be possible to render IPS templates outside of IPS (or maybe with an iframe) along with the editor and be able to add/edit comments to this content? I guess I'd have to create a content and comment class in the application to be able to do this.
Last reply by bfarber, -
- 4 replies
- 403 views
Hello, Please add ability to add the argument "orientation" to the block template plugin {block="block_key" orientation="vertical"} You use \IPS\cms\Blocks\Block::display. That method has 2nd param /** * Parse a block for display * Wrapped in a static method so we can catch the OutOfRangeException and take action. * * @param string|int|\IPS\cms\Blocks\Block $block Block ID * @param string $orientation Orientation * @return string Ready to display HTML */ public static function display( $block, $orientation=NULL ) Of course I can do {expression="\IPS\cms\Blocks\Block::display('block_key', 'vertical')"} Thanks
Last reply by Brian A., -
- 4 replies
- 328 views
Would there be any serious repercussions from changing the post field type from mediumtext to text in the database?
Last reply by Aetherdan, -
- 1 reply
- 359 views
// Initialize IPS4 Framework require_once('./init.php'); /* Get the currently logged in member */ $member = \IPS\Member::loggedIn(); $member_id = $member->member_id; echo $member_id; I have created a php file in my forums parent directory, with the following code. Why does it not return the member id of the logged in user?
Last reply by bfarber, -
- 1 follower
- 1 reply
- 369 views
Hi, Now that I have almost finished converting *a lot* of code from IPS3 to IPS4, I start to worry about security issues: Here it states that: "This means that all request data should be considered potentially tainted and you will need to take precautions not to introduce security issues by relying upon "clean" request data from this class.". But what exactly is the best way to do this "cleaning", before, e.g. inserting a user text in the database? Back in IPS3, I just used: "$this->DB->addSlashes" and I felt quite secure. Is there something similar I can do in IPS4, because I have a lot of code, and converting all my forms to use the new IPS4 Form H…
Last reply by bfarber, -
- 1 follower
- 1 reply
- 263 views
When we add the Member History extension in any 3rd-party and uninstall it later, it will leave "ghost" records in the member's history page: And when you set the board IN_DEV on member's history page, then you got: Maybe would be better to add a check to see the app/content is still available. Or should we handle this by deleting those entries in Uninstall extension?
Last reply by Stuart Silvester, -
- 1 follower
- 4 replies
- 360 views
I'm working on my first application that is using jQuery DataTables. I've figured out how to load the JS and CSS files by putting them in the execute method in the controller, however I'm a bit stumped on how to properly add the images that come bundled with DataTables and are called in the CSS. The apps CSS is here: forum/applications/core/interface/css/css.php?css=applications/tripreport/dev/css/front/datatables.css&v=18dfebd6d5 and it's looking for the images here which is throwing a 404: forum/applications/core/interface/css/DataTables-1.10.16/images/sort_both.png My question is if you are bundling images in an app how do you properly call these? I'…
Last reply by bfarber, -
- 1 follower
- 1 reply
- 378 views
Is there somewhere that I haven't seen yet that has documentation on the ips api & class methods? Such as \IPS\Theme::i()->getTemplate
Last reply by DawPi, -
- 2 replies
- 313 views
Does adding new tables in the dev center automatically create them on install of the application?
Last reply by heydoon, -
- 2 replies
- 296 views
I have two questions, and both ultimately relate to increasing site speed. 1) Serve scaled images: This is a big issue when I do speed testing on my site: https://www.celiac.com/gluten-free/uploads/monthly_2018_01/25659342_1970415423225776_8419745929309912543_n.jpg.7cf8f2906833dc4d31d5b69c3f045374.jpg is resized in HTML or CSS from 200x200 to 54x54. Serving a scaled image could save 11.7KiB (92% reduction). Do you plan to address this, or is there already someone who has? Any ideas here? 2) I believe it was a feature in the last major release that asked to create images for users who had none, which I checked. This created ~63,000 images, with thousand…
Last reply by sadams101, -
- 1 follower
- 1 reply
- 360 views
Hi, Looking at the diff between the new and old release it seems you botched line endings in numerous files. Especially after building designers mode files, there is a lot of this. Someone in your dev team not configured their microsoft(?)-development environment properly? Could you please correct this for your next releases again?
Last reply by bfarber, -
- 3 replies
- 298 views
Hi, What would be the best approach to making all custom profile fields for clubs admin only? What i have currently done is a sneaky css edit, where i simply hid the divs containing the profile field, i.e.: #core_clubfield_2 { display: none; }
Last reply by bfarber, -
- 1 follower
- 6 replies
- 335 views
I am importing a large article Web site into the pages app. The site's current software is called Interspire, so there is no existing import tool that exists. I have a few basic questions that I am hoping I can get some help with, which are: 1) I need to create and display a few custom fields, for example a "Subtitle" field, which is something like a mix between a headline and the article. What is the best way to add the 2-3 new fields so that I don't break IPB Pages, the ability to run auto-updates, add new modules, etc.? Should I just add, for example, new fields to the end of ibf_cms_custom_database_1, like custom_subtitle_1, custom_caption_1, etc.? 2) Has an…
Last reply by bfarber, -
- 6 replies
- 373 views
I'm using ipboard on the on side as a forum software. Now, because I work on an external plattform I would like the user credentials from ipboard for my external plattform too. How to perform a simple login check, using the username / email and password from ipboard database? How did the hashing of password for example work?
Last reply by bfarber, -
- 2 replies
- 297 views
How would I go about trying to display a custom field for a club in a template? Specifically on the club card.
Last reply by bfarber,