*** Joins: paulr (~paul@cpc1-enfi9-0-0-cust389.hari.cable.virginmedia.com) | 04:56 | |
*** Quits: giallu (~giallu@fedora/giallu) (Ping timeout: 264 seconds) | 05:02 | |
*** Joins: istvanb (56ade708@gateway/web/freenode/ip.86.173.231.8) | 06:48 | |
*** Joins: dhx_m (~anonymous@c122-107-170-247.eburwd5.vic.optusnet.com.au) | 06:48 | |
istvanb | hi there | 06:49 |
---|---|---|
istvanb | is there any documentation exists for the mantis php functions? I mean like the user_get_email($t_recipient) etc? | 06:50 |
istvanb | yesterday I have spent a quite reasonable amount of time to write my function, which did exactly the same as the user_get_email :) | 06:51 |
*** Quits: dhx_m (~anonymous@c122-107-170-247.eburwd5.vic.optusnet.com.au) (Remote host closed the connection) | 07:38 | |
paulr | istvanb: you could try http://www.mantisforge.org/cruisecontrol/buildresults/mantisbt?tab=documentation | 07:40 |
paulr | probablyu more specifically http://www.mantisforge.org/cruisecontrol/artifacts/mantisbt/20100802185453/api/elementindex.html | 07:41 |
* paulr hopes dhx is coming back | 07:41 | |
istvanb | thanks man | 07:41 |
istvanb | I will try | 07:41 |
istvanb | I am working on a mantis plugin | 07:41 |
istvanb | if I am done, who can revise it? | 07:42 |
paulr | ? | 07:42 |
istvanb | I guess if I create a plugin somebody has to check it | 07:44 |
istvanb | is that true? | 07:44 |
istvanb | I am also wondering if I can get a help for my plugin from a developer. I have no experience in php at all (however have a coding history of 15 years), so this is my first project | 07:48 |
paulr | i'm sure people will answer questions if you get stuck | 07:53 |
istvanb | ok | 07:56 |
istvanb | I have a question then, maybe you can answer it | 07:56 |
paulr | try | 07:56 |
istvanb | I'd like to create a multiple selection box with all the user groups (admin, reporter, viewer etc) | 07:56 |
istvanb | I have found the following function: | 07:56 |
istvanb | <?php print_project_access_levels_option_list (null) ?>; | 07:57 |
istvanb | the problem with this: it also adds the [default access level] at the first element | 07:57 |
istvanb | I dont want this to be there | 07:57 |
istvanb | do you know how the exclude this? | 07:58 |
paulr | print_project_access_levels_option_list only shows access levels below the person viewing it | 08:01 |
paulr | i didn't realise it added a default | 08:01 |
paulr | and at least, can't see where it adds default | 08:01 |
istvanb | ok, then let me rephrase | 08:02 |
istvanb | I need a box displaying the access levels (all of them). I am stuck with the function above, any solution would be fine for me | 08:02 |
paulr | could always make your own function using print_project_access_levels_option_list as a base | 08:09 |
paulr | for nwo | 08:09 |
istvanb | ok | 08:11 |
istvanb | now I see why it displays the default level | 08:11 |
istvanb | in the print api definition | 08:12 |
istvanb | thereis a line echo '<option value="' . DEFAULT_ACCESS_LEVEL . '"'; | 08:12 |
istvanb | if I comment this then the defult level is gone | 08:12 |
istvanb | however I rather somehow eliminate it from my list instead of writing my own function. Would be much better and easier to understand | 08:13 |
paulr | what version are you developing against? | 08:16 |
istvanb | 1.2.0 or above | 08:16 |
istvanb | however my plugin is using only very basic functionalities so probably it would work with previous versions as well | 08:16 |
paulr | http://git.mantisbt.org/?p=mantisbt.git;a=commitdiff;h=101d87befda99950e7df8cabe2af5f1d4b7591be | 08:17 |
paulr | seems that's changed in trunk :) | 08:17 |
istvanb | is this for the 1.2.2? | 08:20 |
istvanb | on my PC I have 1.2.1 | 08:20 |
paulr | probably more 1.3-dev | 08:24 |
istvanb | yeah | 08:24 |
istvanb | $t_access_levels_enum_string = config_get( 'access_levels_enum_string' ); $t_enum_values = MantisEnum::getValues( $t_access_levels_enum_string ); foreach ( $t_enum_values as $t_enum_value ) { $t_access_level = get_enum_element( 'access_levels', $t_enum_value ); echo '<option value="' . $t_enum_value . '"'; check_selected( $p_val, $t_enum_value ); echo '>' . $t_access_level . '</option>'; } | 08:29 |
istvanb | ok | 08:29 |
istvanb | I have copied the stuff from the print api | 08:29 |
istvanb | and deleted some lines | 08:29 |
istvanb | it seems to be working for me | 08:29 |
istvanb | its quite difficult to code something if you dont know the language:) | 08:30 |
istvanb | is there any specific php development tool, which has the feature to display the function definition easily? | 08:31 |
istvanb | because now I always have to search the files to find the funtion definition | 08:32 |
paulr | not sure | 08:34 |
paulr | I tend to know mantis' code fairly well | 08:34 |
paulr | so know where to look | 08:34 |
istvanb | :) | 08:35 |
istvanb | easy for you then :) | 08:36 |
istvanb | ok, next question | 08:40 |
istvanb | how can I add my pluginpage to the menu bar at the top (where the my view etc tabs are) | 08:41 |
paulr | pretty sure there's an event | 08:52 |
istvanb | next question | 08:54 |
istvanb | I am on the config page | 08:54 |
istvanb | and the button redirect me to the config_edit.php | 08:54 |
istvanb | with the gpc command I can get the content of a specific field from the config.php | 08:55 |
istvanb | gpc_get_int( 'sajat_blabla_threshold', ADMINISTRATOR ); | 08:55 |
istvanb | what the ADMINISTRATOR means here? | 08:55 |
paulr | iirc, default value | 08:57 |
istvanb | iirc? whats that? | 08:57 |
paulr | if I recall | 08:57 |
istvanb | oh :) | 08:58 |
istvanb | now | 08:58 |
istvanb | lets say I set a value to reporter than press the button | 08:58 |
istvanb | hopefully it sets the variable to reporter, and then redirects me to the config.php | 08:59 |
istvanb | the enum shows Admin again | 08:59 |
istvanb | is this expected, or it should show reporter and I made a mistake? | 08:59 |
istvanb | its a mistake | 09:00 |
paulr | check_selected( $p_val, $t_enum_value ) | 09:00 |
paulr | depends what you pass in as $p_val | 09:00 |
paulr | or load in or whatever | 09:00 |
istvanb | when I do the same with the tasks plugin | 09:00 |
istvanb | it shows what I have set | 09:00 |
istvanb | geez its not easy to start coding in php :) | 09:01 |
istvanb | ok, now I have it | 09:02 |
istvanb | this is resolved | 09:02 |
istvanb | I have queried back something else, thats why it displayed admin all the time | 09:02 |
istvanb | so now I have a config.php and a config_edit.php which should work fine | 09:05 |
istvanb | I also have the page which realizes the function I'd like to achive | 09:05 |
istvanb | so somehow depending on the access level I have to make the function page accessible for the users | 09:06 |
istvanb | do you have a clue how to do this? | 09:06 |
istvanb | ok... its enough from geeky stuff for today :) | 09:20 |
istvanb | maybe I will continoue later:) | 09:20 |
istvanb | take care all! | 09:20 |
*** Quits: istvanb (56ade708@gateway/web/freenode/ip.86.173.231.8) (Quit: Page closed) | 09:23 | |
*** Joins: dhx_m (~anonymous@c122-107-170-247.eburwd5.vic.optusnet.com.au) | 10:48 | |
paulr | lo dhx_m | 11:42 |
paulr | gone to bed yet? | 11:42 |
*** Joins: hcl2_ (~hardcorel@75.41.110.112) | 12:29 | |
* paulr pokes nuclear_eclipse | 13:14 | |
paulr | siebrand: lo? | 15:16 |
*** Joins: djSupport (~djsupport@94-193-2-113.zone7.bethere.co.uk) | 16:26 | |
*** Joins: fanno (~Morten@90.184.93.233) | 17:49 | |
paulr | wow | 17:58 |
paulr | this code is like | 17:58 |
paulr | spaghetti | 17:59 |
*** Joins: Renegade15 (Renegade@unaffiliated/renegade15) | 18:03 | |
Renegade15 | good evening | 18:03 |
paulr | do you like spaghetti? | 18:05 |
Renegade15 | as a god or as food? | 18:06 |
paulr | in php :) | 18:06 |
Renegade15 | I would rather prefer straight-forward code, if that's the question. | 18:07 |
* paulr waits patiently for dhx :) | 18:08 | |
Renegade15 | I'm having a weird issue with plugin_lang_get(): I have a MantisColumn-derived class in a second file, and I'm trying to get a language string in there. In the primary file, plugin_lang_get('string name', 'plugin name') works fine - in the second file, the exact same (copy-pasted) code gives me an Application Error 300, claiming the string doesn't exist | 18:08 |
Renegade15 | what's confusing me is that the error includes the manufactured string name, so obviously it did call the function and tried to get the string - so it shouldn't be a scope issue o_O | 18:09 |
Renegade15 | the only thing that stands out to me is that the string name in the error doesn't include the s_ prefix, but as said - the exact same code works in the primary file | 18:10 |
Renegade15 | does anyone have any idea what could be going wrong? | 18:10 |
paulr | that's a nuclear_eclipse type of question | 18:11 |
paulr | heh | 18:11 |
Renegade15 | I figured | 18:11 |
* Renegade15 pokes nuclear_eclipse | 18:11 | |
Renegade15 | so while I'm waiting for the God of Plugins...what's this about spaghetti? | 18:15 |
Renegade15 | is mantis being invaded by goto? | 18:15 |
* micahg sighs...goto | 18:18 | |
paulr | well, | 18:24 |
micahg | try{assert(!defined(NOSTALGIC_FOR_BASIC));}catch exception(){goto 1975;} :) | 18:24 |
paulr | when a helper function calls a custom function that calls | 18:24 |
paulr | :) | 18:24 |
Renegade15 | reminds me of the notification e-mail code I was looking at yesterday | 18:26 |
Renegade15 | speaking of which, I have another, unrelated weird issue | 18:26 |
paulr | custom functions need to die | 18:26 |
paulr | :) | 18:26 |
paulr | mantis is great - you can configure everything :) | 18:26 |
paulr | but that's also a downside | 18:27 |
paulr | as whenever someone asks something | 18:27 |
paulr | without looking yourself | 18:27 |
nuclear_eclipse | Renegade15: are you sure the lang string is defined correctly for your plugin? ie it should be defined as $s_plugin_PLUGINNAME_some_string = ... | 18:27 |
paulr | you've got no chance :) | 18:27 |
Renegade15 | notification e-mails pertaining to bug updates and stuff show a normal url to the bug; notification e-mails about bug notes apparently show the absolute server path instead. I believe the dev reporting the problem implied it happened for notes added by the source code integration user account. Any ideas what could cause that? | 18:27 |
Renegade15 | nuclear_eclipse: As said in the description, I tried the exact same code in the primary file and it worked as expected | 18:28 |
Renegade15 | so yes, I'm sure | 18:28 |
paulr | nuclear_eclipse: I think i've managed to sync the stuff I did in february :) | 18:28 |
nuclear_eclipse | I have no other idea, I've never had that problem | 18:28 |
paulr | (almost)! | 18:28 |
Renegade15 | weird | 18:30 |
nuclear_eclipse | Renegade15: my only other suggestion is to post the code, and I can take some time to look it over and see if I can find the problem (not tonight though) | 18:30 |
paulr | nuclear_eclipse: check i've not broken anything today too ;p | 18:31 |
* nuclear_eclipse is afraid to look | 18:31 | |
paulr | well, I did the lang_api change | 18:32 |
paulr | which dhx/(maybe you) reviewed before | 18:32 |
CIA-103 | Mantisbt: paul * rd4c9fb68cbde /core/lang_api.php: Update lang api for new language files | 18:32 |
paulr | and changed logging a bit | 18:32 |
CIA-103 | Mantisbt: paul * r272bde39d6e0 /bug_view_inc.php: compress_api.php is included by core.php | 18:32 |
CIA-103 | Mantisbt: paul * rcad0ad10f410 /lang/ (50 files): Convert language files to array format | 18:32 |
CIA-103 | Mantisbt: paul * r3ea2997ae1b2 / (12 files in 7 dirs): Diagnostic Logging | 18:32 |
CIA-103 | Mantisbt: paul * rf15d1bfa8139 /core/custom_function_api.php: Arguments for config_get are incorrect - order should be user,project | 18:32 |
CIA-103 | Mantisbt: paul * r8b4f607488f2 /core/helper_api.php: This block of code, is currently pointless: | 18:32 |
nuclear_eclipse | paulr: one question, does your lang_api change break the way plugins currently work? | 18:32 |
paulr | I dont think so | 18:32 |
Renegade15 | on principle, sure, though there's really not much to look at - it works in one file, and doesn't work in the other. The only difference is that it's not directly in the class declaration (only via required_once), but that's what I'm passing the base name for; the same approach is working fine for plugin_table | 18:32 |
paulr | it's backwards compatible | 18:33 |
paulr | i.e. | 18:33 |
paulr | string / array formats | 18:33 |
paulr | i've had german strings + english array | 18:33 |
paulr | english strings + german array | 18:33 |
nuclear_eclipse | ok | 18:33 |
paulr | and it's shown language i'd expect i.e. german/english | 18:33 |
paulr | i've also tested all language files | 18:33 |
paulr | to be fair, I've not tested plugin's specifically today | 18:33 |
nuclear_eclipse | paulr: would be greatly appreciated if you did taht | 18:34 |
paulr | need to know if I need to add @author's tags back into the converted files or whether CREDITS is still up to date | 18:34 |
paulr | I still get german/english plugins for graphs | 18:35 |
paulr | the logging change was to try to start to tidy up | 18:36 |
paulr | and maybe be a bit more useful | 18:36 |
* paulr would kinda like to simplify some of the config *a bit* | 18:37 | |
paulr | albeit, we ofc need all the thresholds etc | 18:37 |
paulr | if i've broken something | 18:37 |
paulr | email me paul@mantisforge.org | 18:37 |
paulr | and it appears in my IM client now | 18:37 |
Renegade15 | okay | 18:54 |
* Renegade15 pokes nuclear_eclipse | 18:55 | |
Renegade15 | I got it to work | 18:57 |
Renegade15 | but the how is not exactly clearing things up for me | 18:57 |
Renegade15 | I simply added a single line $foo = plugin_lang_get('option_desc_prefix', 'TripleI'); before requiring the second file, and that magically made all strings load properly | 18:59 |
Renegade15 | is it possible plugin strings aren't loaded until a load request comes from inside the plugin class or something? | 18:59 |
paulr | # This function prints the custom buttons on the current view page based on specified bug id | 19:02 |
paulr | # and the context. The printing of the buttons will typically call html_button() from | 19:02 |
paulr | # html_api.php. For each button, this function needs to generate the enclosing '<td>' and '</td>'. | 19:02 |
paulr | function custom_function_default_print_bug_view_page_custom_buttons( $p_bug_id ) { | 19:02 |
* paulr ponders | 19:02 | |
nuclear_eclipse | Renegade15: hmm | 19:03 |
Renegade15 | just checked, it also works without the base name parameter within the plugin class...so basically, as long as there's at least one language request beforehand in the primary file/plugin class, it works fine externally | 19:03 |
Renegade15 | looks to me like "external" calls simply don't trigger loading | 19:03 |
*** Quits: fanno (~Morten@90.184.93.233) (Quit: Leaving.) | 19:14 | |
*** Quits: paulr (~paul@cpc1-enfi9-0-0-cust389.hari.cable.virginmedia.com) () | 19:39 | |
*** Quits: scribe9343423 (~scribe934@static.96.23.63.178.clients.your-server.de) (Remote host closed the connection) | 20:00 | |
*** Joins: scribe9343423 (~scribe934@static.96.23.63.178.clients.your-server.de) | 20:00 | |
*** Quits: hcl2_ (~hardcorel@75.41.110.112) (Read error: Operation timed out) | 21:52 | |
*** Quits: Renegade15 (Renegade@unaffiliated/renegade15) (Quit: If the chat tips over, save the angels.) | 23:15 |
Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!