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
-
- 2 replies
- 378 views
Let's say I have 3 tables. They are as follows: users logins names The users table contains an auto incremented primary key as well as a user_unique which is a unique identifier for a user. The names table contains an auto incremented primary key as well as a name_unique which is a unique name to this table. Now assume that a user can login with their user_unique BUT they can choose any name they want. So multiple users will end up with the same name_unique. Inside logins it simple stores users.id (the primary key) and names.id (the primary key) as well as a timestamp. Here is where my problem lies. I want to show a \Table\Db of t…
Last reply by imJexs, -
- 3 replies
- 523 views
When attaching members for a notification, does it need so many of the members table columns as to warrant me using constructFromData() on a whole row? Or does it only need a few columns like member_id and their notification settings? (I sure hope their notification settings aren't in a whole different table where it would have to do an extra query for each attached member... I'm going to assume it's probably stored in one column in the members table as an encoded array, but I haven't had time to go through files looking.). The reason this all came up in my mind is because I was debating how important it is to select only the needed columns. But the more I think abou…
Last reply by bfarber, -
- 1 follower
- 8 replies
- 1.4k views
Hi, I am sorry if i am posting this in the wrong area, i hope not. Is there a way to dump all variables per template? Something like XF has? Example: {xen:helper dump, $visitor} Thanks.
Last reply by Bluto, -
- 2 followers
- 6 replies
- 460 views
Currently clearAll not support fine exclusion of more file, is possible to improve it for each store method? (like with a custom callback/regex/array) system/Data/Store/FileSystem.php /** * Abstract Method: Clear All Caches * * @return void */ public function clearAll( $exclude=NULL ) { foreach ( new \DirectoryIterator( $this->_path ) as $file ) { if ( !$file->isDot() and ( mb_substr( $file, -9 ) === '.ipsstore' or ( mb_substr( $file, -4 ) === '.php' and $file != $exclude . '.php' ) ) ) { @unlink( $this->_path . '/' . $file ); } } foreach( static::$cache as $key => $value ) { if( $exclude === NUL…
Last reply by BomAle, -
- 2 replies
- 543 views
I cant seem to work out how to query the db using two params, there's not really any documentation that I can find and I don't know how to read through the source code to check. Anyway I want to do the following query: SELECT columnname FROM `tablename` WHERE member_id = 1 AND somethingelse = 2 I have tried the following with no luck: $row = \IPS\Db::i()->select('coin_id', 'trader_holdings', array('member_id=?', $member_id, 'period=?', $period));
Last reply by Midnight Modding, -
- 2 replies
- 259 views
I did a tab bar like the one on this very page (qa). But on mine, unlike on this site, when I go to my page, the content from all tabs shows below it, while the page is loading, before going back beyond the tabs like it's supposed to be. I inspected elements on this page, and compared to my own and any time I saw any difference, such as some extra div, I added it in and it didn't improve anything. And for some reason mine has 2 cWidgetContainer divs whereas on this page of this site, there is only one. It's frustrating. I can't even get the content in a tab looking right. I tried to do one with the same look as the "About Me" profile tab by using the richte…
Last reply by Midnight Modding, -
- 1 follower
- 3 replies
- 352 views
Greetings folks, So basically i have this app which does some modifications into the Forums app and also allows to use some widgets on any app, but i can't make CSS to load, it loads only on my app page. I tried making use of the developers page but wasn't really so helpful. Could someone give me some guidance of how should i proceed?
Last reply by Martin A., -
- 1 reply
- 269 views
I did 4 FURL entries for the same url, other than a type= at the end, where I could change up the friendly part of the url, but have them all point to the same file and method. I put type=one, type=two, type=three, and type=four in the actual "real" part. For some reason when I then use those 4 links, two of them have "/&type=two" and "/&type=three" in their friendly urls, and the OTHER two don't have type=one or type=four in the friendly url! edit: I jumped the gun making this topic, as I figured it out quickly. What happened is I was generating the links in a foreach loop and I accidentally had the seo template names reversed for two and three. lo…
Last reply by bfarber, -
- 8 replies
- 448 views
Hi there, i'm trying to develop a plugin where the admin needs to set a forum id, and i wonder if i could do a select list like the one from when you create a new forum ( or edit one ). From what i've seen in the files of the Forums app i need the node form helper but i don't quite understand it. Could someone help me out?
Last reply by bfarber, -
- 4 replies
- 717 views
I've always hated anything to do with design, but am trying my best. I have been looking through suite html files and also had read through help guides several times. For me it's a victory that I got a simple sidebar and grid on the page and the page title and a button. lol. Luckily I have barely any pages to do a complicated view on. Mostly grids and tables. 1. there are a lol of "data-" in them. Such as links with data-parent-id and data-node-id. Is there anything like that I need to be using when working with nodes and content items? Are those examples I just gave basically shortcuts to forming the url and data- is used where it recognizes what it's for? (edit: af…
Last reply by Midnight Modding, -
- 5 replies
- 313 views
edit: editing this where someone doesn't waste time reading a long post I have the answer for. lol. Summary: I was wanting to add an external url in a template for my sidebar and I tried tons and tons of ways and it kept adding my forum site url to it. It turns out I accidentally had a form field as a Text input instead of Url, so there was no protocol added in.
Last reply by Midnight Modding, -
- 1 follower
- 21 replies
- 623 views
I looked through files trying to figure this out, but a couple areas get a bit confusing. I have a notification that is sent during status changes of the item. So 1. it may need to be sent to the same member multiple times, and can be different each time. and 2. the email subject needs a replacement word based on which status we have for the current send(). Docs seem to indicate that one reason to pass $item is for it to prevent duplicates, but it doesn't seem to even use $item in that manner. It seems to only stop duplicates for the current call to save(), by using $sentTo. Am I missing something? If I want to use a lang bit as a replacement word in the em…
Last reply by Midnight Modding, -
- 1 reply
- 290 views
I just converted my webserver form apache to nginx but I can;t seem to locate the 40x and 50x default pages for IPS4. Are there any already created as part of the package?
Last reply by Aetherdan, -
- 2 followers
- 4 replies
- 431 views
Is there any function available in the framework to handle timeout period when querying a url? // Now fetch it and decode the JSON try { $response = $query->request()->get()->decodeJson(); } catch( \IPS\Http\Request\Exception $e ) { die( "There was a problem fetching the request" ); } catch( \RuntimeException $e ) { die( "The response was not valid JSON" ); }
Last reply by Aiwa, -
- 5 followers
- 23 replies
- 753 views
I have the latest IPS on my local machine in Vagrant. I downloaded the latest IPS DEV Tools, but once I switch IN_DEV to true in my constants.php I get an error page: OutOfRangeException No message /system/Patterns/ActiveRecord.php } } /* Load it */ try { $row = static::constructLoadQuery( $id, $idField, $extraWhereClause )->first(); } catch ( \UnderflowException $e ) { throw new \OutOfRangeException; } /* If it doesn't exist in the multiton store, set it */ if( !isset( static::$multitons[ $row[ static::$databasePrefix . static::$databaseC…
Last reply by Stuart Silvester, -
- 1 follower
- 5 replies
- 908 views
Just curious about an opinion from someone from IPS on a third party app adding columns to the members table. I have some people suggesting to only add to members if it's a few columns, some saying never do it, some saying always do it as it's no big deal. I'm talking anywhere from 10-20 columns. I'm not trying to get anyone called "wrong". Just seeing if someone feels it's acceptable to add however many to the members table. Many apps do add it there and it's sure preferable to me, personally, because then you know every member already has a row without having to constantly do a try/catch and create their row. Plus then I wouldn't have to move their data for 3.x use…
Last reply by Midnight Modding, -
- 2 replies
- 388 views
I am ideally wanting to change the background color of pinned topics. How would I go about this? I tried adding this to extra.css to no avail: [data-ipstooltip title="Pinned"] .ipsDataItem { background: orange!important; }
Last reply by Martin A., -
- 3 followers
- 6 replies
- 421 views
I have a list of items <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> <li>item 4</li> <li>item 5</li> </ul> I see you have a UI widdget: ips.ui.pagination Am I correct in assuming this widget can create pagination of the above list? If so, how can I implement it? I can't work it out from that guide. Thank you.
Last reply by Ilya Hoilik, -
- 1 reply
- 296 views
Using the REST API, trying to move database records to another database category will always fail even for valid catagory IDs (numerical). Looking at the relevant code segment in \applications\cms\api\records.php it seems that moving categories erroneously assumes a blog is being edited. Can anyone confirm and/or suggest a workaround
Last reply by bfarber, -
- 2 replies
- 417 views
Hi, Say I have a form input $form->add( new \IPS\Helpers\Form\Number('time', NULL, TRUE ) ); How can I assign the values of that box to some variable, say to $time so that I can send that into database?
Last reply by Midnight Modding, -
- 1 reply
- 443 views
I am ideally wanting to change the background color of pinned topics. How would I go about this? I tried adding this to extra.css to no avail: [data-ipstooltip title="Pinned"] .ipsDataItem { background: orange!important; } What can I do?
Last reply by ehren., -
- 1 follower
- 4 replies
- 551 views
Hello, I'm trying to fetch the current logged in member with $member = \IPS\Member::loggedIn(); However, I always get the following exception (regardless if logged in or not) 'LOCATION_UNKNOWN' in /forum/system/Session/Session.php:60 Stack trace: #0 /forum/system/Member/Member.php(145): IPS\_Session::i() #1 /forum/hwid/API/API.php(14): IPS\_Member::loggedIn() #2 {main} any suggestions?
Last reply by Niko Belger, -
- 4 replies
- 533 views
Hello! Can anybody explain what's going on? I recorded small video: https://i.gyazo.com/755f8718693fb0e5791913077c80bffd.mp4 When i change my lang string on string from IPS i see data from "sprintf", but when i return back my strings, data is lose! Why? Magic? Yes, i have language string in my plugin (as you actually can see in the video). And yes, i have own template in /dev/html/admin/transactions folder of my plugin.
Last reply by goldmorphin, -
- 1 follower
- 4 replies
- 420 views
Any suggestions on the best way to develop an application on multiple machines, at work I have my laptop and once I get home I'd like to switch to my PC since it's more comfortable. I have git setup for version control but any suggestions on what would be the best way to keep the database between both machines synced for in terms of settings, hooks, etc? Thanks!
Last reply by Aiwa, -
- 3 replies
- 835 views
Hello! I develop new payment gateway for IPS; I can easily create folder and .php in /applications/nexus/sources/Gateway, and it's even work! Settings strings easily created in DB and parse from it, but i cannot create new lang strings or new templates through this method Maybe someone say me: how i can create new app where extends default functionality IPS if this functionality requires, that some files be in some (specials) folders e.g. payment gateway, which must be in /applications/nexus/sources/Gateway. Well, or at least, perhaps there is a way to create lang strings and templates that will be in the default folders? (like /applications/nexus/dev/html/admi…
Last reply by goldmorphin,