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
-
- 3 followers
- 7 replies
- 377 views
I'm currently receiving some complaints from a few of my users for an application i released saying that they're getting this error: Class 'IPS\Helpers\Form\CheckBox' not found I don't receive this error when I install the application locally on a fresh install of the software. Does anyone know what might be causing this? He is running 4.3.5 and I'm running 4.3.4, i'm curious if there might have been a change between these two versions that caused this.
Last reply by Aiwa, -
- 1 reply
- 308 views
Hello. I find here that forms have validating methods. It's work for me, when i callback DomainException, but can i modify values instead callback DomainException? I want replace "+" in $val on "". 'unitpay_qiwi' => new \IPS\Helpers\Form\Text( 'unitpay_qiwi', $phone, FALSE, NULL, function( $val ) { if ( strpos($val, '+') !== false ) { $val = str_replace('+', '', $val); } }, NULL, NULL, 'unitpay_qiwi' ),
Last reply by bfarber, -
- 2 replies
- 378 views
- How to generate a table via the Table helper (similar to the one in the ACP Members page). Trying to create one from scratch messes up on the responsive view. - Adding routes when developing plugins, specifically for the Account Settings page stuff. - Pagination + tables, how to take data from the DB and display it in a paginated table, or at the very least, paginated ul/ - How to handle Ajax request calls to certain routes, both in the frontend and backend code If my questions could be answered that would be a blessing as I am having some problems with these. Thank you in advance!
Last reply by BouncingXkala, -
- 2 followers
- 16 replies
- 1.1k views
I have added a new \IPS\Helpers\Form\Member('botuserpanel_administration_username', NULL, TRUE) which works fine. However I would like to access the member_id of the selected member. I can see that it is being returned to the ajax request, but I wouldn't be able to access it to send it via a websocket for example. Is there a possibility to add a data-id attribute in the according <li> node? Right now the HTML looks like this: <li class="cToken" data-value="MemberName">MemberName<span class="cToken_close" data-action="delete">×</span> </li> What I'd be looking for: <li class="cToken" data-value="MemberNam…
Last reply by LaCollision, -
- 1 follower
- 2 replies
- 299 views
Hi, I want to convert forum from phpBB to IPB. I made it several times on my localhost server (XAMPP) and everything was perfect. Today I tried to make this conversion on my normal web server and there was one big problem. When the conversion is finished everything looks good (all data and posts are converted). When I started to rebuild content (on the end of migration) all posts and private messages are changing one by one to NULL in my database (there is NULL in `ipb_forums_posts`. `post`). There is nothing in error log in IPB, no error logs in `ipb_convert_logs` table, no error logs on my server. It is probbably something with my server configuration - what sho…
Last reply by DamonT, -
- 3 followers
- 5 replies
- 499 views
Hey all, I am working on finishing up a IPB module and will be enabling commerce license keys for those who purchase the product - it will be sold using a subscription based model. Im not looking for actually coding answers, but in generalities, how might I protect the license key check portion of the application from any user just deleting the code from the php file so that the license key verification doesn't take place? Thanks!
Last reply by KT Walrus, -
- 1 follower
- 0 replies
- 259 views
Edit: Never mind. Turns out the client is still on 4.2. 4.3 takes care of my issue. ?
Last reply by HeadStand, -
- 1 follower
- 2 replies
- 294 views
I thought that the tasks for disabled applications/plugins was finally fixed in 4.3.x but it seems this is still not the case. You have "fixed" the tasks table in the ACP to not show the tasks for disabled applications & plugins but the tasks themselves are still running in background anyway. I noticed because I got a warning about a task that kept locking even thought the application it is attached to is disabled. This is the code you use to load the tasks to display in the table: $table = new \IPS\Helpers\Table\Db( 'core_tasks', \IPS\Http\Url::internal( 'app=core&module=settings&controller=advanced&do=tasks' ), array( array( '(p.pl…
Last reply by teraßyte, -
- 1 follower
- 1 reply
- 474 views
Hi. I'm trying to implement Single Sign On like it is described here: https://invisioncommunity.com/developers/docs/members-authentication/developing-single-sign-on-sso-integration-r65/ I have created a plugin which extends \IPS\Session\Front and I know i should implement read($session) method. I have an endpoint on my oauth2 external server. He tells me when user is logged in there, but i don't know what is the best way to login user. I was looking for any method that do it for me. I don't want to to reinvent the wheel. ? I have created a Custom OAuth2 login method handler. Currently I do just a trick in HTML - via jquery I'm checking if user is log…
Last reply by bfarber, -
- 1 reply
- 704 views
I am working on an application that will be storing a large number of IP addresses from a variety of sources, but I'd like to be able to systematically update the IP's with their current country code. First instinct is to use the \IPS\GeoLocation class, however, I will be making many calls to this API a day and I just want to check the rate limit before I do this. I would prefer to be able to use this, but I could understand if you don't want this receiving an abundance of calls and I can look into an alternative. Thank you.
Last reply by Ryan Ashbrook, -
- 1 follower
- 2 replies
- 308 views
i would like to make 2 request for the ActiveRecord, first one, to have a static "all" method: public static function all(array $config = []): ActiveRecordIterator { $sql = Db::i()->select($config['columns']??'*', static::$databaseTable, $config['where'] ?? null, $config['order'] ?? null, $config['limit'] ?? null, $config['group']??null, $config['having']??null,$config['flags']??0 ); return new ActiveRecordIterator( $sql, static::class); } Reason: a lot of frameworks "model" class offers a similar method, like laravel. this would reduce down on code, and add an extra layer of abstraction. second request would be a way to retrieve…
Last reply by CodingJungle, -
- 1 follower
- 2 replies
- 325 views
at some point, can you guys make the autloader more compliant with psr4 over psr0? there are some differences between the two standards, and currently the $PSR0Namespaces is sorta limited.
Last reply by CodingJungle, -
- 4 replies
- 263 views
Seems like I mentioned this before and someone said it's a bug, but I was never clear on exactly what the bug is or if I could do a workaround other than having to keep editing the acpmenu file. Basically, every time I add a new acp menu entry via developer center, it then removes several of my old acp menu links totally! I am noticing it's always the ones that have a do= value and all others remain in tact. So that is the bug is any with do= will get removed? So I will just have to keep editing the acpmenu file when this happens? (note: this is in 4.2, so maybe was fixed in 4.3?)
Last reply by Midnight Modding, -
- 1 follower
- 1 reply
- 466 views
Hi, 1. in the ACP the list of system logs (core_log) is sorted by time. When I debug, I usually add some log lines not only one. As the result the lines in ACP are messed (they are listed not in the order of actual writing) if the time of the log line is the same. I need the possibility to sort the log lines by ID. 2. I miss the button to delete all logs from the list. At the moment I go to phpAdmin and execute truncate on core_log table. This is annoying and requires each time additional steps. Thanks
Last reply by bfarber, -
- 1 follower
- 1 reply
- 299 views
When try to submit a dialog into plugins page the dialog hide with setLoading the form, and the values are not fetched because form is hidden. // Otherwise, we've passed verification and we can submit the form as normal form.attr( 'data-bypassValidation', true ).submit(); if I replace code as follow, the values are passed into request // Otherwise, we've passed verification and we can submit the form as normal setLoading(false); form.attr( 'data-bypassValidation', true ).submit(); @bfarber @Daniel F
Last reply by BomAle, -
- 1 follower
- 0 replies
- 321 views
Hello, I see into matrix table when define a column with Form\Select with unlimited checkbox and check unlimited checkbox the javascript don't unselect the previous select element. I have seen it caused by a limited condition into _unlimitedCheck on ips.ui.form, therefore I "suggest" to edit it as follow: //change: _unlimitedCheck = function (checkbox) { var inputs = checkbox.closest('.ipsFieldRow_content,[data-role="unlimitedCatch"]').find('input:not([type="checkbox"],[type="hidden"]),select,textarea'); //into: _unlimitedCheck = function (checkbox) { var inputs = checkbox.closest('.ipsFieldRow_content,[data-role="unlimitedCatch"],[data-matrixrowid] td').find(…
Last reply by BomAle, -
- 1 follower
- 4 replies
- 325 views
Working on a resource that adds 33 columns of core_groups table on INSTALL version. OK. For the 1.0.0 final version, I added one TEXT column and saved all my info in a JSON format and dropped all those columns in the upgrade.php of the final version: $toDrop = array( 'g_school_comission_sale', 'g_can_act_as_dean', 'g_can_view_history', 'g_can_delete_schools', 'g_can_view_closed_schools', 'g_can_edit_schools', 'g_can_feature_schools', 'g_can_unfeature_schools', 'g_change_owner', 'g_can_create_schools', 'g_nr_schools', 'g_can_link_unlink_club', 'g_can_change_school_status', 'g_can_move_courses', 'g_can_assign_instructors', 'g_bulk_message_sch…
Last reply by Adriano Faria, -
- 9 replies
- 458 views
@Mark, I'm working a resource that will allow purchases. Fine. The commission and fee goes to board account and I will use $item->payTo so the money goes to someone else. And here is the issue. This particular resource will introduce a third user to receive a slice of the money. An example? Something like a club: The board will receive 10% The user who is selling will receive 80% The club owner SHOULD receive the other 10% I actually didn't try yet so probably I'm making a dumb question without even try.. is it enough to use 2 payTo? Will this work? If so, how/where can I set the % for the seller and the "club" owner? Tks.
Last reply by Adriano Faria, -
- 3 replies
- 316 views
This app has no ACP restrictions: (thus no acprestrictions.json too). It has only a MemberForm extension (that's why it has no ACP restricition; it will use the acp member_edit profile) but it appears as an option in the Administrators ACP area: This is, of course, confusing the user: https://invisioncommunity.com/forums/topic/432267-ban-members-from-forums/?do=findComment&comment=2749762 Should I report as a bug?
Last reply by Midnight Modding, -
- 1 follower
- 3 replies
- 332 views
I have some Date inputs on my form. Let's call one dateOne. I set time to TRUE. It has time there to select on the form. Yet if I var_dump \IPS\Request::i()->dateOne, it shows it's only a string of the date with no time! No wonder my validation checks are erroring out. What is going on here? But if I var_dimp $val from a current input's date field, it correctly has the time in the DateTime object. The only place I can find an example of IPS comparing times on a form is when they have it all as one input. That would be too messy for my situation, due to 6 times involved.
Last reply by Midnight Modding, -
- 2 followers
- 12 replies
- 475 views
I have 2 date inputs on a form, let's call them date_one and date_two. Each has 'time' => TRUE. What is wrong with this check in my second input's validation check? if( !\IPS\Request::i()->date_one or $val <= \IPS\DateTime::create( \IPS\Request::i()->date_one ) ) It's not giving desired results. When entering the same times, BUT different dates, and the second date being later than the first date, it's still coming up true instead of false... edit: oops I see one problem on another one is create() uses UTC. So I need to use ts(). But I think I have another issue... checking.
Last reply by Midnight Modding, -
- 1 follower
- 20 replies
- 451 views
Someone really wants this to be a pm, not notification. I saw from examples on here how to send a PM convo, but me, personally, I think it would be annoying for the sender of the mass PM to have many, many conversations in his/her inbox. 1. Is there an option to use a fake sender? 2. Is there any problem with just simply not calling authorize() for the sender? I don't see anything in that method, other than what is undone by unauthorize(), so I assume I could skip authorize() rather than call both. I originally thought delete() only deleted it for one person, but I see it simply unauthorizes that user and then rebuildParticipants() calls delete() if all particip…
Last reply by Midnight Modding, -
- 5 replies
- 369 views
Hi Guys :) On my site I have two forum 1 and forum 2. Under Forum 1 there are 15 another subforums. I would to like to hide author name tumbnail next to topic Title only for Forum 1 and all its subforums not for Forum 2. I am trying to implement this by Html Logic MY Problem is i have to put every 15 forums ids inside the code to work it properly. right now i am looking for single global variable that is shared by a forum and its subforums so it with single line of code it works
Last reply by Gill, -
- 1 reply
- 305 views
I connect here: \IPS\Theme\class_core_front_global Hook: CSS Selector: #elSignIn_submit Code: {{$formcaptcha = new \IPS\Helpers\Form\Captcha;}} {$formcaptcha|raw} If I enable the hook on keycaptcha, then on the Sing UP form - keycaptcha stops displaying. What could be the problem?
Last reply by bfarber, -
- 5 replies
- 401 views
Using the code below, when selecting all of the items in a multi select form helper, the visually deselect although the stetting gets saved. If I only select one or any amount less than the total settings in the box, it works as expected. No java script errors occur. $packages = array(0 => 'Foo', 1 => 'Bar', 2 => 'Baz'); $form->add(new \IPS\Helpers\Form\Select('products_names_disable_multiple_quantities', \IPS\Settings::i()->products_names_disable_multiple_quantities, false, array('options' => $packages, 'multiple' => true))); Small gif for further explanation : https://i.gyazo.com/8396cb36ac45cd2f68deddc542fdc910.mp4
Last reply by bfarber,