| ../irclogs/#mantishelp.2010-08-15.log | ||
| --- scribe started --- | 00:00 | |
| paulr | nuclear_eclipse: up at all? | 00:04 |
|---|---|---|
| nuclear_eclipse | yo | 00:04 |
| paulr | lo | 00:04 |
| paulr | erm | 00:04 |
| paulr | plugin events | 00:04 |
| paulr | can we change parameters to one? | 00:05 |
| nuclear_eclipse | which event, and what change? | 00:05 |
| paulr | EVENT_LOG | 00:05 |
| paulr | to take 2 parameters not one | 00:05 |
| nuclear_eclipse | is it possible to do this while maintaining backward compatibility for anything already using EVNT_LOG? | 00:06 |
| * paulr shrugs :) | 00:06 | |
| paulr | it's a silly event atm | 00:07 |
| nuclear_eclipse | well, that's the critical point IMO | 00:07 |
| paulr | i'm guessing you didn't code event_log event? | 00:08 |
| nuclear_eclipse | nope, that was a Victor thing | 00:08 |
| paulr | right ok | 00:09 |
| paulr | so | 00:09 |
| paulr | starting from beginning | 00:09 |
| paulr | log_event takes (int, string) atm | 00:09 |
| paulr | where one of the 'strings' is a var_export from db api | 00:09 |
| paulr | I want to change log_event to take either int, string OR int, array | 00:10 |
| paulr | ------ | 00:10 |
| paulr | now thep lugin part | 00:10 |
| paulr | atm, the plugin fires an event sending in 1 string | 00:10 |
| paulr | formatted as [<stringfromint>]<string> | 00:10 |
| paulr | but only does this if the log level is set in the global config | 00:10 |
| paulr | which given we don't currently define a 'user defined log range' | 00:11 |
| paulr | I kinda wonder about this event :) | 00:11 |
| nuclear_eclipse | paulr: write up a bug report, implement what you think is best, attach a patch to it, and then poke me on it and I'll look it over; I'm unfortunately a bit busy atm | 00:13 |
| nuclear_eclipse | got a big release for a mod project I'm working | 00:13 |
| paulr | i'll keep the event as was | 00:13 |
| paulr | k | 00:13 |
| nuclear_eclipse | on | 00:13 |
| istvanb | hi there | 10:49 |
| istvanb | is there any documentation exists for the mantis php functions? I mean like the user_get_email($t_recipient) etc? | 10: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 :) | 10:51 |
| paulr | istvanb: you could try http://www.mantisforge.org/cruisecontrol/buildresults/mantisbt?tab=documentation | 11:40 |
| paulr | probablyu more specifically http://www.mantisforge.org/cruisecontrol/artifacts/mantisbt/20100802185453/api/elementindex.html | 11:41 |
| * paulr hopes dhx is coming back | 11:41 | |
| istvanb | thanks man | 11:41 |
| istvanb | I will try | 11:41 |
| istvanb | I am working on a mantis plugin | 11:41 |
| istvanb | if I am done, who can revise it? | 11:42 |
| paulr | ? | 11:42 |
| istvanb | I guess if I create a plugin somebody has to check it | 11:44 |
| istvanb | is that true? | 11: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 | 11:48 |
| paulr | i'm sure people will answer questions if you get stuck | 11:53 |
| istvanb | ok | 11:56 |
| istvanb | I have a question then, maybe you can answer it | 11:56 |
| paulr | try | 11:56 |
| istvanb | I'd like to create a multiple selection box with all the user groups (admin, reporter, viewer etc) | 11:56 |
| istvanb | I have found the following function: | 11:56 |
| istvanb | <?php print_project_access_levels_option_list (null) ?>; | 11:57 |
| istvanb | the problem with this: it also adds the [default access level] at the first element | 11:57 |
| istvanb | I dont want this to be there | 11:57 |
| istvanb | do you know how the exclude this? | 11:58 |
| paulr | print_project_access_levels_option_list only shows access levels below the person viewing it | 12:01 |
| paulr | i didn't realise it added a default | 12:01 |
| paulr | and at least, can't see where it adds default | 12:01 |
| istvanb | ok, then let me rephrase | 12: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 | 12:02 |
| paulr | could always make your own function using print_project_access_levels_option_list as a base | 12:09 |
| paulr | for nwo | 12:09 |
| istvanb | ok | 12:11 |
| istvanb | now I see why it displays the default level | 12:11 |
| istvanb | in the print api definition | 12:12 |
| istvanb | thereis a line echo '<option value="' . DEFAULT_ACCESS_LEVEL . '"'; | 12:12 |
| istvanb | if I comment this then the defult level is gone | 12: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 | 12:13 |
| paulr | what version are you developing against? | 12:16 |
| istvanb | 1.2.0 or above | 12:16 |
| istvanb | however my plugin is using only very basic functionalities so probably it would work with previous versions as well | 12:16 |
| paulr | http://git.mantisbt.org/?p=mantisbt.git;a=commitdiff;h=101d87befda99950e7df8cabe2af5f1d4b7591be | 12:17 |
| paulr | seems that's changed in trunk :) | 12:17 |
| istvanb | is this for the 1.2.2? | 12:20 |
| istvanb | on my PC I have 1.2.1 | 12:20 |
| paulr | probably more 1.3-dev | 12:24 |
| istvanb | yeah | 12: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>'; } | 12:29 |
| istvanb | ok | 12:29 |
| istvanb | I have copied the stuff from the print api | 12:29 |
| istvanb | and deleted some lines | 12:29 |
| istvanb | it seems to be working for me | 12:29 |
| istvanb | its quite difficult to code something if you dont know the language:) | 12:30 |
| istvanb | is there any specific php development tool, which has the feature to display the function definition easily? | 12:31 |
| istvanb | because now I always have to search the files to find the funtion definition | 12:32 |
| paulr | not sure | 12:34 |
| paulr | I tend to know mantis' code fairly well | 12:34 |
| paulr | so know where to look | 12:34 |
| istvanb | :) | 12:35 |
| istvanb | easy for you then :) | 12:36 |
| istvanb | ok, next question | 12:40 |
| istvanb | how can I add my pluginpage to the menu bar at the top (where the my view etc tabs are) | 12:41 |
| paulr | pretty sure there's an event | 12:52 |
| istvanb | next question | 12:54 |
| istvanb | I am on the config page | 12:54 |
| istvanb | and the button redirect me to the config_edit.php | 12:54 |
| istvanb | with the gpc command I can get the content of a specific field from the config.php | 12:55 |
| istvanb | gpc_get_int( 'sajat_blabla_threshold', ADMINISTRATOR ); | 12:55 |
| istvanb | what the ADMINISTRATOR means here? | 12:55 |
| paulr | iirc, default value | 12:57 |
| istvanb | iirc? whats that? | 12:57 |
| paulr | if I recall | 12:57 |
| istvanb | oh :) | 12:58 |
| istvanb | now | 12:58 |
| istvanb | lets say I set a value to reporter than press the button | 12:58 |
| istvanb | hopefully it sets the variable to reporter, and then redirects me to the config.php | 12:59 |
| istvanb | the enum shows Admin again | 12:59 |
| istvanb | is this expected, or it should show reporter and I made a mistake? | 12:59 |
| istvanb | its a mistake | 13:00 |
| paulr | check_selected( $p_val, $t_enum_value ) | 13:00 |
| paulr | depends what you pass in as $p_val | 13:00 |
| paulr | or load in or whatever | 13:00 |
| istvanb | when I do the same with the tasks plugin | 13:00 |
| istvanb | it shows what I have set | 13:00 |
| istvanb | geez its not easy to start coding in php :) | 13:01 |
| istvanb | ok, now I have it | 13:02 |
| istvanb | this is resolved | 13:02 |
| istvanb | I have queried back something else, thats why it displayed admin all the time | 13:02 |
| istvanb | so now I have a config.php and a config_edit.php which should work fine | 13:05 |
| istvanb | I also have the page which realizes the function I'd like to achive | 13:05 |
| istvanb | so somehow depending on the access level I have to make the function page accessible for the users | 13:06 |
| istvanb | do you have a clue how to do this? | 13:06 |
| istvanb | ok... its enough from geeky stuff for today :) | 13:20 |
| istvanb | maybe I will continoue later:) | 13:20 |
| istvanb | take care all! | 13:20 |
| paulr | lo dhx_m | 15:42 |
| paulr | gone to bed yet? | 15:42 |
| * paulr pokes nuclear_eclipse | 17:14 | |
| paulr | siebrand: lo? | 19:16 |
| paulr | wow | 21:58 |
| paulr | this code is like | 21:58 |
| paulr | spaghetti | 21:59 |
| Renegade15 | good evening | 22:03 |
| paulr | do you like spaghetti? | 22:05 |
| Renegade15 | as a god or as food? | 22:06 |
| paulr | in php :) | 22:06 |
| Renegade15 | I would rather prefer straight-forward code, if that's the question. | 22:07 |
| * paulr waits patiently for dhx :) | 22: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 | 22: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 | 22: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 | 22:10 |
| Renegade15 | does anyone have any idea what could be going wrong? | 22:10 |
| paulr | that's a nuclear_eclipse type of question | 22:11 |
| paulr | heh | 22:11 |
| Renegade15 | I figured | 22:11 |
| * Renegade15 pokes nuclear_eclipse | 22:11 | |
| Renegade15 | so while I'm waiting for the God of Plugins...what's this about spaghetti? | 22:15 |
| Renegade15 | is mantis being invaded by goto? | 22:15 |
| * micahg sighs...goto | 22:18 | |
| paulr | well, | 22:24 |
| micahg | try{assert(!defined(NOSTALGIC_FOR_BASIC));}catch exception(){goto 1975;} :) | 22:24 |
| paulr | when a helper function calls a custom function that calls | 22:24 |
| paulr | :) | 22:24 |
| Renegade15 | reminds me of the notification e-mail code I was looking at yesterday | 22:26 |
| Renegade15 | speaking of which, I have another, unrelated weird issue | 22:26 |
| paulr | custom functions need to die | 22:26 |
| paulr | :) | 22:26 |
| paulr | mantis is great - you can configure everything :) | 22:26 |
| paulr | but that's also a downside | 22:27 |
| paulr | as whenever someone asks something | 22:27 |
| paulr | without looking yourself | 22: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 = ... | 22:27 |
| paulr | you've got no chance :) | 22: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? | 22:27 |
| Renegade15 | nuclear_eclipse: As said in the description, I tried the exact same code in the primary file and it worked as expected | 22:28 |
| Renegade15 | so yes, I'm sure | 22:28 |
| paulr | nuclear_eclipse: I think i've managed to sync the stuff I did in february :) | 22:28 |
| nuclear_eclipse | I have no other idea, I've never had that problem | 22:28 |
| paulr | (almost)! | 22:28 |
| Renegade15 | weird | 22: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) | 22:30 |
| paulr | nuclear_eclipse: check i've not broken anything today too ;p | 22:31 |
| * nuclear_eclipse is afraid to look | 22:31 | |
| paulr | well, I did the lang_api change | 22:32 |
| paulr | which dhx/(maybe you) reviewed before | 22:32 |
| CIA-103 | Mantisbt: paul * rd4c9fb68cbde /core/lang_api.php: Update lang api for new language files | 22:32 |
| paulr | and changed logging a bit | 22:32 |
| CIA-103 | Mantisbt: paul * r272bde39d6e0 /bug_view_inc.php: compress_api.php is included by core.php | 22:32 |
| CIA-103 | Mantisbt: paul * rcad0ad10f410 /lang/ (50 files): Convert language files to array format | 22:32 |
| CIA-103 | Mantisbt: paul * r3ea2997ae1b2 / (12 files in 7 dirs): Diagnostic Logging | 22:32 |
| CIA-103 | Mantisbt: paul * rf15d1bfa8139 /core/custom_function_api.php: Arguments for config_get are incorrect - order should be user,project | 22:32 |
| CIA-103 | Mantisbt: paul * r8b4f607488f2 /core/helper_api.php: This block of code, is currently pointless: | 22:32 |
| nuclear_eclipse | paulr: one question, does your lang_api change break the way plugins currently work? | 22:32 |
| paulr | I dont think so | 22: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 | 22:32 |
| paulr | it's backwards compatible | 22:33 |
| paulr | i.e. | 22:33 |
| paulr | string / array formats | 22:33 |
| paulr | i've had german strings + english array | 22:33 |
| paulr | english strings + german array | 22:33 |
| nuclear_eclipse | ok | 22:33 |
| paulr | and it's shown language i'd expect i.e. german/english | 22:33 |
| paulr | i've also tested all language files | 22:33 |
| paulr | to be fair, I've not tested plugin's specifically today | 22:33 |
| nuclear_eclipse | paulr: would be greatly appreciated if you did taht | 22: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 | 22:34 |
| paulr | I still get german/english plugins for graphs | 22:35 |
| paulr | the logging change was to try to start to tidy up | 22:36 |
| paulr | and maybe be a bit more useful | 22:36 |
| * paulr would kinda like to simplify some of the config *a bit* | 22:37 | |
| paulr | albeit, we ofc need all the thresholds etc | 22:37 |
| paulr | if i've broken something | 22:37 |
| paulr | email me paul@mantisforge.org | 22:37 |
| paulr | and it appears in my IM client now | 22:37 |
| Renegade15 | okay | 22:54 |
| * Renegade15 pokes nuclear_eclipse | 22:55 | |
| Renegade15 | I got it to work | 22:57 |
| Renegade15 | but the how is not exactly clearing things up for me | 22: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 | 22:59 |
| Renegade15 | is it possible plugin strings aren't loaded until a load request comes from inside the plugin class or something? | 22:59 |
| paulr | # This function prints the custom buttons on the current view page based on specified bug id | 23:02 |
| paulr | # and the context. The printing of the buttons will typically call html_button() from | 23:02 |
| paulr | # html_api.php. For each button, this function needs to generate the enclosing '<td>' and '</td>'. | 23:02 |
| paulr | function custom_function_default_print_bug_view_page_custom_buttons( $p_bug_id ) { | 23:02 |
| * paulr ponders | 23:02 | |
| nuclear_eclipse | Renegade15: hmm | 23: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 | 23:03 |
| Renegade15 | looks to me like "external" calls simply don't trigger loading | 23:03 |
Generated by irclog2html.py