![]() ![]() |
pon, 22 maj 2006 - 00:14
Post
#1
|
|
![]() Linux Bastard ![]() ![]() ![]() ![]() Grupa: VIP'y Postów: 625 Dołączył: nie, 12 lut 06 Skąd: Bytom (Śląskie) Korzystam z Nie wiem |
Witam,
Istnieje może strona gdzie są opisane klasy (do czego dana słuzy) w IPB2.x ? Chętnie bym pisał mody Pozdravki -------------------- |
|
|
|
śro, 24 maj 2006 - 12:03
Post
#2
|
|
![]() Sensei Grupa: Administratorzy Postów: 2,467 Dołączył: pon, 05 gru 05 Skąd: iBplanet.pl Korzystam z IPB 2.3 |
w plikach zazwyczaj na poczatku masz napisane za co odpowiada klasa i jak jej uzywac np. pamietam ze w ips_kernel/class_db.php jest napisane na poczatku jak uzywac klas odpowiedzialnychza wspolprace z baza pozatym wiekszosc jest dosc zrozumieale nazywana ..
|
|
|
|
śro, 24 maj 2006 - 15:47
Post
#3
|
|
![]() Linux Bastard ![]() ![]() ![]() ![]() Grupa: VIP'y Postów: 625 Dołączył: nie, 12 lut 06 Skąd: Bytom (Śląskie) Korzystam z Nie wiem |
Zobacze, jednak o wiele prościej by było gdyby wszystkie opisy były w jednym miejscu
-------------------- |
|
|
|
pią, 26 maj 2006 - 10:08
Post
#4
|
|
![]() Sensei Grupa: Administratorzy Postów: 2,467 Dołączył: pon, 05 gru 05 Skąd: iBplanet.pl Korzystam z IPB 2.3 |
Mam jeden art jak robic komponenty
Załączony/e plik/i
|
|
|
|
wto, 30 maj 2006 - 22:57
Post
#5
|
|
![]() Linux Bastard ![]() ![]() ![]() ![]() Grupa: VIP'y Postów: 625 Dołączył: nie, 12 lut 06 Skąd: Bytom (Śląskie) Korzystam z Nie wiem |
Dzieki, pewnie ze sie przyda
Ja znalazlem to: http://forums.invisionpower.com/index.php?showforum=273 Niewiele ale zawsze cos -------------------- |
|
|
|
czw, 01 cze 2006 - 20:43
Post
#6
|
|
![]() Sensei Grupa: Administratorzy Postów: 2,467 Dołączył: pon, 05 gru 05 Skąd: iBplanet.pl Korzystam z IPB 2.3 |
ooo nie masz wjazdu na ipsbeyound? tam poszukam moze cos bedzie ...
|
|
|
|
śro, 07 cze 2006 - 19:08
Post
#7
|
|
![]() Linux Bastard ![]() ![]() ![]() ![]() Grupa: VIP'y Postów: 625 Dołączył: nie, 12 lut 06 Skąd: Bytom (Śląskie) Korzystam z Nie wiem |
Ja niestety nic więcej nie znalazłem, więc w wolnych chwilach przestudiuje klasy i zrobie 'poradnik', bo bez znajomości klas zbyt wiele modów się nie napisze
-------------------- |
|
|
|
czw, 08 cze 2006 - 15:48
Post
#8
|
|
![]() Sensei Grupa: Administratorzy Postów: 2,467 Dołączył: pon, 05 gru 05 Skąd: iBplanet.pl Korzystam z IPB 2.3 |
do 2.1 moge Ci dac jeszcze opis $ipsclass znalazlem na ipsbyond
CYTAT In previous versions of IPB, different classes were instantiated into separate objects. You may remember $ibforums, $print, $std...all of these were separate objects that had to be globalized in each function that you wished to use them in.
In 2.1, most of the same properties and methods are still available, however you will access them through $this->ipsclass instead (in 99% of the instances in which you will need to know this). $ipsclass is instantiated in index.php, and a reference to it is passed to each object that is created. Let's take a look at some of the properties and methods available, as well as the objects you can access through $ipsclass. KOD $this->ipsclass->DB->function_name() The old $DB has been moved to $this->ipsclass->DB. Just about all of the functions have retained the same name as was used in 2.0, so you should mostly be able to just update $DB to $this->ipsclass->DB in your files and be good to go. Just remember you don't have to globalize anything now since you have the pseudo-variable $this to use. KOD $this->ipsclass->print->function_name() The old $print has been moved to $this->ipsclass->print. Most of the calls are the same, so you have little changes to make here as well. KOD $this->ipsclass->ip_address Contains the IP address of the current viewer. Uses the settings in the ACP regarding the matching of X_FORWARDED_FOR IP addresses. KOD $this->ipsclass->vars['variable_name'] All those variables that are added to the system cache (mostly the default settings available upon installation of the board, but modifications can be set to be added to the system cache as well) will be stored in this array. Replace 'variable_name' with the key you used to add the setting. You can take a look at the settings available in this array by going into the ACP->Tools & Settings->Cache Control and hit the button next to settings, and hit View Cache. You'll get a popup window with the array printed out. KOD $this->ipsclass->cache['cache_store_key'] You can add entries to the forums_cache_store table, and then load them up when your page is called (either through your file under sources/components_init/, or by adding the key to the $choice array in index.php). The cache_store_key will be the cs_key in forums_cache_store. If you set the record in the database to be an array (cs_array=1), then the array will be unserialized and stored here. Thus, you can access it through $this->ipsclass->cache['cs_key']['value_in_array']. Example of creating a new cs_ entry KOD //in this example the cs_name is test and we are creating a new entry $this->ipsclass->cache['test'] = array(); $this->ipsclass->cache['test'][1] = array('test','testt'); $this->ipsclass->update_cache( array( 'name' => 'test', 'array' => 1, 'deletefirst' => 1 ) ); KOD $this->ipsclass->member['array_value'] This is the data for the current member. Note: You should be using 'members_display_name' from this array to get the current user's name, rather than the 'name' value. This is the case as of 2.1.0. Note that not EVERY column from forums_members is stored here. Also note that nearly all columns from forums_groups are stored in this array, and an additional 'is_mod' key is set to a 1 or a 0, depending upon whether the member is a moderator or not. KOD $this->ipsclass->input['form_or_url_value'] This array holds all GET and POST keys (merged, POST overwrites GET) already cleaned and ready for use. As a modification author, it is still always your responsibility to code with security in mind, however common "baddies" are removed from these keys and values (such as ' " < and > characters). KOD $this->ipsclass->time_options $this->ipsclass->num_format $this->ipsclass->get_magic_quotes $this->ipsclass->query_string_safe $this->ipsclass->query_string_real $this->ipsclass->user_agent $this->ipsclass->browser $this->ipsclass->operating_system $this->ipsclass->can_use_fancy_js Stores some properties for the script to access. Time options is used when calling get_date(), as is num_format. get_magic_quotes stores the current setting of get_magic_quotes_gpc(). Query string safe is a "safe" formatted query string with & entities, while query_string_real contains the actual query string with &. The user agent, browser and OS are stored in the next three properties. can_use_fancy_js is determined if the user has a compatible version of Mozilla or IE that will allow the AJAX-type and RTE javascript functions to work. Support for other browsers will likely be added as they adopt the specifications. KOD $this->ipsclass->init_load_cache( [array] ) You pass an array of cs_key values. The function loads them into $this->ipsclass->cache['cs_keys'] (cs_keys being the keys you pass to the function). You should attempt to load your cache when this function is first called (using the components_init/ plugin style, or by specifying the keys to load in index.php if you add a new "act=" page, as each call to this function will result in an additional (unnecessary) database query. Example: KOD //found in components_init/ //this is a good way of not creating another SQL query but using the one declared in index.php $this->ipsclass->cache_array = array_merge( $this->ipsclass->cache_array, array('cs_key)); KOD $this->ipsclass->init_db_connection() Initilizes database connection based on the configuration settings currently set. There should be very few times you need to call this manually, as it has already been done for you in index.php. KOD $this->ipsclass->fetch_os() Again, few times you should need to use this, as this function is called automatically and the result is stored in $this->ipsclass->operating_system. Return values include "mac", "windows", and "unknown". KOD $this->ipsclass->fetch_browser() Another function you should not have to spend much time learning. The value is already stored in $this->ipsclass->browser as an array. Keys are 'browser' and 'version'. KOD $this->ipsclass->load_class( string var, string var, [string var] ) This function, while useful, is commonly not used. This function loads a class. First argument is the file name (including path information). The second argument is the class name. If you have a constructor function in the class (PHP 5, ___construct(), or PHP 4, function with same name as class name) that accepts an argument, you can pass it the argument through this function as well. The third argument this function accepts is an optional argument you wish to pass to the class you are loading. KOD $this->ipsclass->can_queue_posts( [string var] ) This function determines if this user can manager queued posts. The optional argument is a forum id (if you wish to check a specific forum). KOD $this->ipsclass->get_multimod( string var ) Checks if a user can use the multi-mod tool, and if so returns an array of allowed actions (based on their privileges set in the ACP). The argument is required, and is the forum id to check against. KOD $this->ipsclass->unpack_member_cache( array ) While not exactly *required*, if the serialized array is not passed to this function it will serve no purpose. This function is designed to take a serialized array and return it unserialized. KOD $this->ipsclass->pack_and_update_member_cache( int var, array, [array] ) This function stores the members cache (in forums_members.members_cache). The int you pass to it is the member id (probably most often $this->ipsclass->member['id']). The first array (required) is the array you would like to store in this members members_cache record. The last (optional) array is the existing cache record. This is required, however if you do not pass this array to the function, it will load the member's existing cache record for you. The two arrays are merged and the resulting array is serialized and stored back in the members table. Really there should be just about no times when you need to use this function. KOD $this->ipsclass->update_forum_cache() Updates the forum cache, just as indicated. Unlike the other caches, you do not need to populate $this->ipsclass->cache['forum_cache'], as this function will do it for you when it is called. KOD $this->ipsclass->update_cache( array ) Updates the record in the forums_cache_store table. The array accepts 'name', 'value', 'array', 'deletefirst', and 'donow'. deletefirst and donow are flags to tell the function whether to first delete the record, and then store a new one (versus updating an existing record), and the donow flag indicates if the cache should be updated when this function is called, or just flagged to be updated on shutdown. The name is the cs_key. The array key is a flag to indicate if the value is an array or not. Arrays are serialized before they are stored (and automatically unserliazed with the init_load_cache function). The value is the value to be stored. You can optionally NOT pass the value, and store it in $this->ipsclass->cache[ 'name' ] (where name is the name you pass to the function). This function will automatically use that value if none is passed. Common usage is to store statistics or something similar that you don't want to have to generate on the fly on each page load. When it is time to update the value, you update the value in $this->ipsclass->cache['keyname']['value'] and the entire array (or single value) is available in your script immediately, plus the update_cache function will have access to it as well. Either way works. KOD $this->ipsclass->my_deconstructor() deconstructor function. Runs miscellaneous stored database queries, closes database connection, and sends any pending emails stored through the process_mail_que function). KOD $this->ipsclass->process_mail_queue() Sends queued emails in increments. This function is called on each page load (on shutdown) processing remaining emails. KOD $this->ipsclass->acp_load_template( string var ) Loads a template file to be used in the ACP (file should be located under skin_acp/IPB2_Standard/acp_skin_html). You can first set $this->ipsclass->skin_acp to be a different directory and IPB2_Standard will be replaced with the directory you specified. KOD $this->ipsclass->acp_load_language( string var ) Loads a language file to be used in the ACP. Language abstraction for the ACP is expected in 3.0, however this has not been finalized. KOD $this->ipsclass->load_template( string var, [int var] ) Loads a skin template. Loads all functions in the skin template into $this->ipsclass['compiled_templates'][ $name ]->template_function_name( args ). Note: $name is the name you pass in the first argument to this function, and template_function_name( args ) are the functions in this template. Args is optional, depending upon what your skin template requires. The second parameter is an id, and will force the function to load the skin id specified rather than (necessarily) the current skin set id for the browsing user. Some other properties are set at this time (such as $this->ipsclass->loaded_templates and $this->ipsclass->skin['_type']). KOD $this->ipsclass->load_skin() Loads a skin set. Accepts no arguments, loads the skin set based on the members skin choice or the board default (or a forum-specific skin, when applicable). Set's the $this->ipsclass['_skin'] properties. KOD $this->ipsclass->load_language( string var ) Loads a language file based on the user's default language set (or the board's default language set, if the user has not specified a language set, or only one is available). The required argument is the language file name (without .php at the end). KOD $this->ipsclass->get_new_pm_notification( [int var, [int var]] ) The first optional parameter is the limit (how many you would like to pull). The second is a flag to specify if this is an XML AJAX request or a standard request. This returns the fully formatted new pm notification box html and is claled (by default) from class_display.php KOD $this->ipsclass->txt_convert_charsets( string var, string var, [string var] ) This function converts between character sets. Quite nifty. The first argument is the text to convert. The second argument is the character set we are converting FROM. The third argument is the character set to convert to. If this is not passed, the default character set specified in the ACP is used. This function will try to first use the php function 'mb_convert_encoding', then 'recode_string', followed by 'iconv'. If it is unable to use any of those functions it simply returns the text you passed it. This means you are responsible for ensuring the text is actually converted. KOD $this->ipsclass->txt_truncate( string var, [int var] ) Truncates a string without breaking html entities. The first argument is the string (likely html formatted), the second argument is the position to truncate to. Default is 30 characters. KOD $this->ipsclass->txt_alphanumerical_clean( string var ) Returns an alphanumeric only string. KOD $this->ipsclass->txt_mb_strlen( string var ) Returns the size/length of a multi-byte string. KOD $this->ipsclass->txt_stripslashes( string var ) Takes into account $this->ipsclass->get_magic_quotes and determines how to properly strip the slashes off of the string. Returns a string with extra slashes stripped. KOD $this->ipsclass->txt_raw2form( string var ) Takes a string and formats it so it is safe to use in a textarea. KOD $this->ipsclass->txt_form2raw( string var) Unconverts text for use in a textarea (specifically, the $ and \ characters). KOD $this->ipsclass->txt_safeslashes( string var ) Attempt to safely slash the data for input into a database. KOD $this->ipsclass->txt_htmlspecialchars( string var ) Convert some of the common html entities, includes multi-byte character support. KOD $this->ipsclass->txt_UNhtmlspecialchars( string var ) Opposite of last function, unconverts the entities the txt_htmlspecialchars converted, includes multi-byte character support. KOD $this->ipsclass->txt_windowstounix( string var ) Converts Windows (\r\n) (and Mac (\r) ) newlines to Unix newlines. KOD $this->ipsclass->return_md5_check() Creates an md5 hash that can be used to validate form input and such. The md5 hash is generated based on some static factors so that an identical hash can be created later and compared to the first hash. Common usage is to add this hash into a form, and then check it when the form is submitted. KOD $this->ipsclass->trim_leading_comma( string var ) Trims the leading comma of a string. KOD $this->ipsclass->trim_trailing_comma( string var ) Trims the trailing comma of a string. KOD $this->ipsclass->clean_comma( string var ) Removes duplicate commas (more than one in a sequence). Useful if you are imploding an array into a comma separated string and the possibility of blank array values existed. KOD $this->ipsclass->clean_perm_string( string var ) This is a wrapper for the other 3 comma functions. Calls the other three functions for you (so you can make one function call instead of 3 separate ones in your script). KOD $this->ipsclass->math_strlen_to_bytes( int val ) Converts strlen value to bytes. KOD $this->ipsclass->size_format( int val ) Converts a size (in bytes) to a human readable size with KB or MB at the end (or bytes, if it is less than 1 kb). KOD $this->ipsclass->print_forum_rules( int val ) When passed the one (required) argument, this function prints the forum rules for the forum id passed. The returned value is fully formatted based on the html template used. KOD $this->ipsclass->hdl_ban_line( array ) Pass this function an array with unit, and timespan set, or pass this function a time in format date_start:date_end:timespan:unit and a ban timeframe is returned. KOD $this->ipsclass->check_perms( array ) You must first set $this->ipsclass->perm_id_array with your permission array. Then you pass the user's set permission array, and a TRUE/FALSE comparison is done to determine if the user is permitted or not. Your script would be responsible for stopping the user if FALSE is returned. KOD $this->ipsclass->create_perms_from_group( string var ) This function accepts a comma separated string of group ids, and then returns a comma separated string of permission mask ids associated with those groups. KOD $this->ipsclass->do_number_format( int val ) Formats a number based on settings specified in the ACP for number formatting. KOD $this->ipsclass->hdl_forum_read_cookie( [string val]) Sets/gets a cookie specifying the forums this user has read. KOD $this->ipsclass->scale_image( array ) Array should contain 'max_width', 'max_height', 'cur_width', and 'cur_height. The function returns an array with 'img_height' and 'img_width' set. The values should proportionately resize the image so that it falls within the maximum settings you sent. KOD $this->ipsclass->show_gif_img( int val ) Generates and displays a random number as an image for the anti-spam controls. KOD $this->ipsclass->show_gd_img( int val ) Same as above, only using GD (which is harder for bots/scripts to analyze and return the actual values from). KOD $this->ipsclass->my_nl2br( string var ) Passed a string, this function will turn new lines into XHTML br tags. KOD $this->ipsclass->my_br2nl( string var ) Does the opposite of the last function, turning br tags into newlines. KOD $this->ipsclass->make_profile_link( string var, [int val] ) You pass this function a name and an id, and it returns a profile link (based on the input values). This function does not verify if the data is accurate. It only verifies the id is > 0 and returns a link if it is, else just the name. KOD $this->ipsclass->boink_it( string val ) The input string should be a (valid) url. This function will use your setting in the ACP to determine the type of redirect to utilize. Location headers (or Refresh headers on Windows) are optimal, however this function supports a "meta redirect" in case some of your php files are outputting white space causing the headers not to work. KOD $this->ipsclass->make_password() Returns a random 8 character password. KOD $this->ipsclass->folder_icon( array, [int val], [int val] ) This function is designed to determine the appopriate topic folder icon. You pass this function the topic information in the array, set the second argument to 1/0 depending upon if you were the topic starter, and optionally send the time you wish to compare against (last_visit time is used if this is ommitted), and this function determines which icon is appropriate to display. KOD $this->ipsclass->text_tidy( string val ) Takes raw text from a database and converts to all html entities. Uses the html entity translation, as well as some regular expression matching to try to convert everything for a textarea (or for storage, theoretically). This function does not check if characters have already been html converted, thus it would turn & into &amp;. Use this function at your own risk. KOD $this->ipsclass->build_pagelinks( array ) One of my favorite functions, this is a simple, yet powerful one. It builds page links, that's it. But it saves you the trouble of having to determine how many records were on each page, and where did you start at, and how many are left and so forth. You pass this function an array with the following keys set appropriate:
KOD //global class var that has been added: var $rowsPerPage = "30"; var $numrows = "300"; //end //copy this for every other $_GET/$_POST declared. in this example its $CODE if($this->ipsclass->input['CODE']) { $after_magic_quote .= "&CODE=".$this->ipsclass->input['CODE']; } //End copy //The Build page Links tools: $htmlbitvar = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $this->numrows, 'PER_PAGE' => $this->rowsPerPage, 'CUR_ST_VAL' => $this->ipsclass->input['st'], 'L_SINGLE' => $this->ipsclass->lang['single_page_forum'], 'BASE_URL' => $this->ipsclass->base_url."autocom=test".$after_magic_quote, ) //End links tool ); //Sql Limit $this->ipsclass->DB->query("Select blahblah...LIMIT ".$this->ipsclass->input['st'].", ".$this->rowsPerPage KOD $this->ipsclass->build_forum_jump( int val, [int val, [int val]]) Builds the forum jump list, taking into account whether you set the option enable short forum jump list in the acp or not. The first argument specifies whether the full html should be returned or not (you may not want all the html if you are making your own drop down, or making a multi-select). The second flag overrides the short forum jump list setting, and the third flag removes redirect forums from the list. KOD $this->ipsclass->clean_email( string val ) Verifies an email address and returns TRUE or FALSE depending upon whether it appears to be valid. KOD $this->ipsclass->get_date( string val, string val, [int val, [int val]] ) This function will accept a timestamp in the first argument, and a method (in the valid list of methods found under the property time_options discussed above), and format it into a readable date based on the method requested. The third argument forces removal of relative dates (today, yesterday), and the fourth argument is to specify if you do wish to use relative dates. It is override within the function, so there is no point passing it. Takes into account your date settings in the ACP, as well as the members and boards time zone offsets. KOD $this->ipsclass->get_time( string val, string val ) This is similar to get date except that the second argument is a date() compliant method of formatting a timestamp into a date. The first argument is still the timestamp. Time zone settings are *not* taken into account. KOD $this->ipsclass->get_time_offset() Returns the current users applied time zone offset in minutes (which will be the board time zone offset if none is specified). KOD $this->ipsclass->convert_local_date_to_unix( array ) Pass in an array with hour, minute, month, day, year specified and a timestamp is returned (minus the offset that is returned automatically from get_time_offset()). KOD $this->ipsclass->unixstamp_to_human( string val ) Accepts a timestamp and returns an array with minute, hour, day, month, and year set appropriately. KOD $this->ipsclass->date_gmmktime( int val, int val, int val, int val, int val, int val ) Nearly identical to gmmktime(). KOD $this->ipsclass->date_getgmdate( string val ) Nearly identical to getdate(). KOD $this->ipsclass->my_setcookie( string val, string val, [int val] ) Sets a cookie (first argument) with value (second argument) based on cookie settings in ACP. The third optional parameter specifies if it should be a stickie cookie (not expire anytime in the near future). KOD $this->ipsclass->my_getcookie( string val ) Returns the cookie specified by the input name. If you use my_setcookie, then on another page load you can use my_getcookie to obtain the value originally set. KOD $this->ipsclass->parse_incoming() Called automatically, this populates $this->ipsclass->input (and calls the functions to clean the keys and values for you). KOD $this->ipsclass->parse_clean_key( string val ) Takes the string value input and cleans it for usage as an array key. KOD $this->ipsclass->parse_clean_value( string val ) Parses the value sent to this function and cleans it. Removes a lot of html tags that could cause problems, strips slashes if necessary. KOD $this->ipsclass->clean_evil_tags( string val ) Removes tags that would (most commonly) be used for cross site scripting attacks through javascript (or that could potentially break the display of the page if rendered). KOD $this->ipsclass->remove_tags( string val ) Removes the tags used by the global board wrapper so that they won't get replaced through input data instead of the templates when the templating engine is called. KOD $this->ipsclass->is_number( int val ) Verifies if the input is a number or not (returns the number if it is, else returns nothing). KOD $this->ipsclass->set_up_guest() Returns an array of default member data for a guest. KOD $this->ipsclass->get_avatar( string var, [int val, [string val, [string val]]] ) Returns an avatar image. You must pass the first parameter, which is the member's avatar stored value. The second parameter is a setting on whether the member is viewing avatars, the third value is the dimensions if specified, and the final parameter is the type (url, local or upload). KOD $this->ipsclass->quick_init() Quick initialization to perform tasks that don't need all the cache/templates/etc loaded. KOD $this->ipsclass->Error( array ) Produces the IPB error screen. Pass it LEVEL, and MSG and that should be enough. There are two other params, but they are unimportant for modders as of yet. MSG is the language bit key to use (if you have loaded your own custom language file, this can be used. Else you can use a key in lang_errors by default). KOD $this->ipsclass->board_offline() Shows board offline message when appropriate. KOD $this->ipsclass->select_var( array ) Designed so you can pass this function an array of selectable variable options. It will return the chosen variable (the selected one). Likely never a time you would find a use for this function. KOD $this->ipsclass->array_filter_clean_read_topics( string var ) Determines if the value passed to this function is greater than the cut off date for storing read topics. KOD $this->ipsclass->load_words( array, string var, string var ) Deprecated: you pass this function your current language bit array as argument 1, then pass it the filename in argument 2 and the language folder in argument 3 and it loads the language bits and returns the merged array. You should use load_language instead. load_language uses only 1 argument, which is the filename. After running this, you access the language strings you've loaded in $this->ipsclass->lang This is the general contents of $this->ipsclass. As you will notice there is a lot of information and lot of methods you can utilize. Don't forget DB and print are objects under ipsclass as well. We'll leave those for another discussion however. |
|
|
|
pon, 26 cze 2006 - 20:19
Post
#9
|
|
![]() Linux Bastard ![]() ![]() ![]() ![]() Grupa: VIP'y Postów: 625 Dołączył: nie, 12 lut 06 Skąd: Bytom (Śląskie) Korzystam z Nie wiem |
Dopiero teraz zauważyłem... niestety w 2.0 jest inaczej, ale za niegługo będe miał 2.1 więc na pewno się przyda, dzięki!
A tutaj dalszy ciąg Night kontra IPB od środka W jaki sposób (najprościej) sprawdzić czy user jest adminem, chce to wykorzystać w skinie, narazie mam to rozwiązane tak: KOD <if="ipb.member['id'] == "1""> Oraz kolejna rzecz, dodałem do skórki (Render_msg) warunek: KOD <if="author['member_group'] == "Grupa: Nowy""> Jednak ten if jest pomijany... Chce sobie zrobić button w powiadamiaczu o nowej PW który prowadzi do skryptu który zmienia grupe usera (jednak ma on się pojawić tylko wtedy jeżeli user ma grupe Nowy, oraz jeżeli user jest adminem) ) Zmienna $author['member_group'] zwraca KOD Grupa: nazwa_grupy Pozdravki -------------------- |
|
|
|
pon, 26 cze 2006 - 22:08
Post
#10
|
|
![]() Sensei Grupa: Administratorzy Postów: 2,467 Dołączył: pon, 05 gru 05 Skąd: iBplanet.pl Korzystam z IPB 2.3 |
do sparawdzania czy admin polecałbym
KOD <if="ipb.member['g_access_cp'] == 1"> zaczerpniete z member_bar'a a co do grupy to może KOD if="ipb.member['mgroup'] == nr. grupy"> z tego samego miejsca.. a jak już no może "Grupa: Nowy" bez "" daj ... |
|
|
|
pon, 26 cze 2006 - 22:12
Post
#11
|
|
![]() Linux Bastard ![]() ![]() ![]() ![]() Grupa: VIP'y Postów: 625 Dołączył: nie, 12 lut 06 Skąd: Bytom (Śląskie) Korzystam z Nie wiem |
1. Dzięki, nie wpadłem na to
2. Ta zmienna pewnie zwróci id grupy zalogowanego, a ja potrzebuje sprawdzić grupe osoby która wysłała PW. 3. Sprawdze i dam znać Pozdravki //EDIT Niestety nie pomogło, będe musiał zrobić dodatkowe potwierdzenie w skrypcie zmieniającym grupe żeby przypadkiem komuś nie zmienić
-------------------- |
|
|
|
czw, 13 lip 2006 - 11:49
Post
#12
|
|
![]() Sensei Grupa: Administratorzy Postów: 2,467 Dołączył: pon, 05 gru 05 Skąd: iBplanet.pl Korzystam z IPB 2.3 |
http://www.invisionpower.com/dir_phpdoc_ipb/ tu masz opis wszelkich klas ale w 2.1
|
|
|
|
sob, 15 lip 2006 - 15:10
Post
#13
|
|
|
Gaduła ![]() ![]() ![]() Grupa: Użytkownicy Postów: 121 Dołączył: czw, 15 gru 05 Skąd: Rzeszów Korzystam z Nie wiem |
jeżeli to nie działa
KOD if ($SDK->is_ingroup(array("4(grupa admina)", "1(grupa nowego)"))) {
echo ("i jedziesz dalej :P"); } |
|
|
|
sob, 15 lip 2006 - 19:58
Post
#14
|
|
![]() Sensei Grupa: Administratorzy Postów: 2,467 Dołączył: pon, 05 gru 05 Skąd: iBplanet.pl Korzystam z IPB 2.3 |
po 1 stary temat.. po 2 to jest kawałek skina.. a nie zawartość jakiegoś pliku php więc sdk nie ma tam zastosowania...
|
|
|
|
nie, 16 lip 2006 - 11:10
Post
#15
|
|
|
Gaduła ![]() ![]() ![]() Grupa: Użytkownicy Postów: 121 Dołączył: czw, 15 gru 05 Skąd: Rzeszów Korzystam z Nie wiem |
ma zastosowanie
Ocz\ywiscie nalezy pamietac o prawach autorskich |
|
|
|
czw, 20 lip 2006 - 23:07
Post
#16
|
|
![]() Linux Bastard ![]() ![]() ![]() ![]() Grupa: VIP'y Postów: 625 Dołączył: nie, 12 lut 06 Skąd: Bytom (Śląskie) Korzystam z Nie wiem |
print_r
Dla ipb 2.0.x KOD <?php echo "<pre>" . print_r( $ibforums ) . "</pre>"; ?> Pokazuje bardzo ładnie do czego służy dana funckja w klasie, że też wcześniej na to nie wpadłem -------------------- |
|
|
|
czw, 07 gru 2006 - 06:35
Post
#17
|
|
![]() Gaduła ![]() ![]() ![]() Grupa: Użytkownicy Postów: 182 Dołączył: pią, 02 cze 06 Skąd: Łańcut Korzystam z IPB 2.2 |
Witam! Sorki że stary temat odgrzebuję, ale nie było sensu pisać nowego.
Ma ktoś z was może jakiś aktualny link do tego opisu klas w IPB, bo ten: http://www.invisionpower.com/dir_phpdoc_ipb/ nie działa. Bardzo bym prosił bo zacząłem się uczyć z plików IPB ale to strasznie opornie idzie, a taki opis bardzo by pomógł. Jeśli macie jakiegoś linka, to proszę podzielcie się //EDIT oczywiście klasy w IPB 2.1.x! Ten post edytował deceq czw, 07 gru 2006 - 06:36 -------------------- |
|
|
|
![]() ![]() |
|
Wersja Lo-Fi | Aktualny czas: sobota, 19 maj 2012 - 20:17 |