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
- 12 replies
- 429 views
I need to get short weekday names dynamically. But this code in templates doesn't work: {{$day1 = 'day_' . date( 'w', $timestamp ) . '_short';}} {lang="$day1"} Is it possible to do this?
Last reply by bfarber, -
- 0 replies
- 293 views
Hello, Please refactor AdvertisementLocations extension. Allow set position for settings. /** * Get the locations and the additional settings * * @param array $settings Current setting values * @return array Array with two elements: 'locations' which should have keys as the location keys and values as the fields to toggle, and 'settings' which are additional fields to add to the form */ public function getSettings( $settings ) { I added $formFields = array( new \IPS\Helpers\Form\Text( 'ad_test_setting1', isset($settings['ad_test_setting1']) ? $settings['ad_test_setting1'] : null, false, array(), null, null, …
Last reply by newbie LAC, -
- 0 replies
- 293 views
hello team, can anyone share with me how to get my commerce plugin to work just like the invasion power companies? Basically when you go to buy something it takes you straight to a check out page. But when I buy something on my page it has 4 steps. 1.) product, 2.) add to cart, 3.) confirm the cart 4.) check out cart, 5. ) credit card and purchase.... how do I elite steps 2-4 and they just click and go straight to a check out page? -Jason
Last reply by Jason Brown_41238, -
- 1 follower
- 11 replies
- 441 views
Hi I'm trying to create an additional way for people to login using the "External Data" base under "Login Handlers" I filled out everything correct and matched it to the data base but now I am getting this error message. IPS\Db\Exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 (1064) What I don't understand is if the problem is in IPB4 or something in the Actually MYSQL data base that i'm trying to reference. Any insight? I feel like I'm really close and this shouldn't be that hard.
Last reply by Jason Brown_41238, -
- 2 followers
- 2 replies
- 362 views
I want to force a log off after a browser is closed or after 24 hours since the last board visit. Would removing session cookies conflict with any IPB functions here?
Last reply by Michael.J, -
- 3 followers
- 14 replies
- 507 views
While working on two auto-embedding plugins, I noticed there's no way to know which page/area/controller you're at when processing the embed, which means you could fill a signature with Youtube videos, or Google Docs (which is what I'm working on right now). You can't use \IPS\Text\Parser::$area, as that isn't set. And since the embedding is handled trough a AJAX call, you can't really look at \IPS\Request either. So right now there is no way (that I can see) to limit the usage of the auto embedding. I guess you'll know the editorLocation when "validateLink" is called in CKEDITOR.plugins.ipsautolink, so why not pass it along, and at least let us 3rd party devs u…
Last reply by Martin A., -
- 2 followers
- 2 replies
- 341 views
I'm trying to make an add on to the Mod CP, but as I look into the controller, it checks to see if there is a class in the extensions folder. For example: modcp/reports goes to \IPS\core\extensions\ModCp\Reports. So if I had modcp/test it would look for \IPS\core\extensions\ModCp\Test, which you can't make with a plugin. I already got the link made, now where should I make the method?
Last reply by newbie LAC, -
- 13 replies
- 545 views
@Mark, I'm trying to add an option when updating to latest version of my app but it's not working. That's what I got: - Created a file called options.php in app/setup/upg_210001/ with the following content: $options = array(); $options[] = new \IPS\Helpers\Form\YesNo( '210001_fied_name', FALSE ); Then on app/setup/upg_210001/upgrade.php I got: public function step2() { if ( $_SESSION['upgrade_options']['app']['210001']['field_name'] ) { //do something } return TRUE; } But it upgrades from version 210000 to 210001 without show the form. Am I forgetting something ? Tks.
Last reply by bfarber, -
- 6 replies
- 400 views
I have created a page in Pages and was wondering if there is a way of checking if a visitor to that page is in a particular group? Thanks in advance
Last reply by bfarber, -
- 2 followers
- 1 reply
- 324 views
In \IPS\core\Statuses\Status, there's a $commentsPerPageAjax = 25 static variable that doesn't seem to be used anywhere. AFAICT it's intended for the "load more comments" ajax links, but that uses $commentsPerPage = 3 the same way the main page load does. In addition, there's a static function getCommentsPerPage(void) that just returns $commentsPerPage. There seems to be inconsistent use in code between this function and the static variable itself (mostly the variable), meaning a plugin needs to modify both to avoid buggy behaviour a plugin effectively can't modify getCommentsPerPage() to return the result of an expression (e.g. a setting value), because …
Last reply by bfarber, -
- 3 followers
- 1 reply
- 357 views
Hello developers! Now I'm working on extended streams for my client. He want to see media (YouTube, SoundCloud, Last.fm or Image) from content in each item in the stream. In general (without custom design) he want to see something like this: I'm using \DOMDocument. It works correctly. But maybe you have a better approach how to realize it? Or suggestion how to make it easier? Because I'm not sure this is a best way. This is my code to parse YouTube video: <!-- Load content from topic row (if this is a topic) --> {{if $indexData['index_class'] == 'IPS\forums\Topic\Post'}} {{$post = \IPS\Db::i()->select( 'post', 'forums_posts', array(…
Last reply by bfarber, -
- 1 follower
- 7 replies
- 394 views
I find this really strange that when I remove something from the approval queue, it updates the count. But when I refresh the page, it is incorrect. Anyone else having these issues?
Last reply by bfarber, -
- 1 follower
- 3 replies
- 288 views
The ModCp Extensions getTab method allows us to return 'null' if the tab shouldn't be shown. The ModCpMembers Extensions don't allow us this. Please implement the ModCpMembers usage the same way, so that we can perform a permission check before we return the tab.
Last reply by Daniel F, -
- 5 replies
- 360 views
If it's not currently possible, (and I don't see any options in v4.1.9) I'd like to suggest adding the capability of a shared album within the Gallery. A shared album would allow other users to contribute photos to a photo album started/owned by a different user. E.g. If several users attended an event and took photos, they could all be uploaded and consolidated into a single album. Is this, at all, possible? Thanks!
Last reply by 1EvilC5, -
- 2 replies
- 457 views
I'm working on a REST-API for "reports" object. If utilizing method "report" (/ipb/system/Content/Content.php), the "report_by" field in line 810 will be set to currently logged in user: 'report_by' => (int) \IPS\Member::loggedIn()->member_id, So my question is: How can I set the logged in user for a REST API call? Otherwise all actions performed and all permission checks will be based upon guest role what's limiting possible features drastically. So here is my current state: public function POSTindex() { /* this doesn't load a member as logged in globally. $member_id = \IPS\Request::i()->member_id; $member = \IPS\Member::load($member_…
Last reply by IPBWI.com Matthias Reuter, -
- 1 follower
- 1 reply
- 387 views
Need to add a new field on "Complete Registration" form but I can't: /* Build the form */ $form = new \IPS\Helpers\Form( 'form', 'register_button' ); if( !\IPS\Member::loggedIn()->real_name OR \IPS\Member::loggedIn()->name === \IPS\Member::loggedIn()->language()->get('guest') ) { $form->add( new \IPS\Helpers\Form\Text( 'username', NULL, TRUE, array( 'accountUsername' => \IPS\Member::loggedIn() ) ) ); } if( !\IPS\Member::loggedIn()->email ) { $form->add( new \IPS\Helpers\Form\Email( 'email_address', NULL, TRUE, array( 'accountEmail' => TRUE ) ) ); } $form->addButton( 'cancel', 'link', \IPS\Http\Url::internal( 'app…
Last reply by HeadStand, -
- 1 follower
- 0 replies
- 291 views
I'm trying to exclude a list of forums from showing up in streams, What I've found so far was to hook into \IPS\Content\Search\Mysql\Query and change the filterByContent method. So far this is what I've got: public function filterByContent( array $contentFilters, $type = TRUE ) { parent::filterByContent( $contentFilters, $type ); $params = []; if ( \IPS\Dispatcher::i()->controller == 'streams' ) { $where = []; foreach ( $contentFilters as $filter ) { $app = explode( '\\', $filter->itemClass )[1]; if ( in_array( $app, ['blog', 'cms', 'downloads', 'forum…
Last reply by Tom Irons, -
- 1 follower
- 1 reply
- 552 views
Hello! I'm sure it is possible. Maybe I'm stupid, but I don't know how. Can someone write a simple instruction how to create Manual gateway using plugin system? I have created 3 payment gateways and currently working on 4 more. But I hate this files, I want to contribute my gateway in one xml-file. It is easier for end-users to install and upgrade. It is easier for me to contribute - archive two files (xml-plugin and txt-info) and upload to Marketplace. Thank you in advance!
Last reply by Ahmad E., -
- 1 follower
- 1 reply
- 322 views
Was debating on submitting this as a bug, but I wasn't sure so I'll post it here. Some of the other links work like posts or registrations, but I'm getting this error on the others.
Last reply by Daniel F, -
- 3 followers
- 4 replies
- 386 views
As per title, can you add the hook filename under the extended class in the Hooks tab in the developer center for plugins? Obviously this is not an issue for plugins with only a few files, but when you start having plugins with lots of files it becomes really useful and makes you waste less time. I have plugins with several hooks and sometimes I just forget which is what. Can you add the file name under the extended class title or maybe after it? It would certainly help, right now I have to click the edit icon and look at the file contents in order to retrieve the correct file. Even editing doesn't list anywhere the file other than a generic hookXXX top-l…
Last reply by teraßyte, -
- 2 followers
- 4 replies
- 351 views
Had a client who purchased CJ Menu from me, and then asked me to get it to work in "designer mode". CJ Menu is basically a fancy theme hook to replace the primary menu in IPS. However it doesn't appear theme hooks get processed in designer mode. Is this intentional? or is there a trick to this that i'm not seeing? I've tried several plugins that are theme hooks and created a few myself, but to no avail, none of them would work in designer mode. As i originally thought it was something i had done in cj menu that prevented it from running. If this is the wrong section for this, please feel free to move it.
Last reply by HeadStand, -
- 8 replies
- 521 views
Last reply by Daniel F, -
- 1 follower
- 3 replies
- 393 views
Posted on the other forum this question but no luck from other devs, so ill ask here. On 3.4 we could set up a task to run for example sundays, can it be done on 4.1 or is there anyway i can work around to do this ?
Last reply by teraßyte, -
- 2 replies
- 342 views
Could we have the url to the licensed site for marketplace purchases either via the contributor center or via the API? We have no way of knowing which sites carry licensed copies of our software and which don't.
Last reply by Kevin Carwile, -
- 1 follower
- 5 replies
- 413 views
Hello, Add condition for photo checkbox. I have login handler without status/photo/etc. Please see my report
Last reply by Mark,