Developer Connection
Use this forum to interact with our development team on technical issues, suggestions and official best practices advice.
1,680 topics in this forum
-
- 2 followers
- 2 replies
- 276 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
- 416 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
- 260 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
- 466 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
- 295 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
- 275 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
- 277 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
- 301 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
- 222 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
- 288 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
- 379 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
- 306 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
- 206 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
- 391 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
- 233 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
- 275 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
- 285 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
- 425 views
Last reply by Daniel F, -
- 1 follower
- 3 replies
- 292 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
- 240 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
- 300 views
Hello, Add condition for photo checkbox. I have login handler without status/photo/etc. Please see my report
Last reply by Mark, -
- 1 follower
- 1 reply
- 311 views
So I utilize profile fields in one instance in a template hook and one instance in a widget. For the template hook I've created a select setting in the setting area for my app which lists all the profile fields of type URL. On the frontend this creates a link (if that URL profile field is set for the member) beneath their content with that target. For the widget (which is a list of members) I intend to do pretty much the same. I've created a widget setting that also lists all profile fields of type URL. If that widget setting is set, the idea is that instead of having the member name link go to their profile, it will go to the target of the profile field URL. …
Last reply by Mark, -
- 4 replies
- 310 views
Hi there. It was requested twice before Couldn't find the other topic but I participated on it. We need to add fields to the EDIT PROFILE form. We can't do this today: if ( \IPS\Request::i()->isAjax() ) { \IPS\Output::i()->output = $form->customTemplate( array( call_user_func_array( array( \IPS\Theme::i(), 'getTemplate' ), array( 'forms', 'core' ) ), 'popupTemplate' ) ); } else { \IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'forms', 'core' )->editContentForm( \IPS\Member::loggedIn()->language()->addToStack( 'profile_edit' ), $form ); } The only way out today is add a new tab on ACCOUNT SETTINGS, …
Last reply by Adriano Faria, -
- 2 replies
- 473 views
4.1.4 seems to include some changes to how grouping works with Db tables for strict mode, with the side effect that we can use multiple groupBy columns now. Awesome! But the row count doesn't account for grouping at all. Line 270 in \IPS\Helpers\Table\Db: <?php /* Count results (for pagination) */ $count = \IPS\Db::i()->select( 'count(*)', $this->table, $where ); That means with my data set, $count returns the total number of records (235, 10 pages), but the grouped table only has 19 rows. 9 empty pages. (Strangely, with only one group column, I seem to have the opposite problem--only one page, regardless of the grouped number of results.) Fi…
Last reply by Ryan H., -
- 1 follower
- 4 replies
- 544 views
Hello, how it works on your server? I'm living in Poland, tested it with ".de" mail on mine account and I was recognized as I'm from Germany. Maybe little show off yout backstage how it exactly recognizing the users? Thanks in advance.
Last reply by bfarber,