API Documentation


Table of Contents

LJ::Abuse::get_policy — Gets policy structures to be used by other parts of this system. Uses an in process cache to maintain data.
LJ::CleanHTML::clean — Multi-faceted HTML parse function
LJ::Cmdbuffer::flush — Flush up to 500 rows of a given command type from the cmdbuffer table.
LJ::Cmdbuffer::get_property — Get a property of an async job type, either built-in or site-specific.
LJ::Comment::create — Create a new comment. Add them to DB.
LJ::Comment::new — Gets a comment given journal_u entry and jtalkid.
LJ::DB::time_range_to_ids — Performs a binary search on a table's primary id key looking for time boundaries as specified. Returns the boundary ids that were found, effectively simulating a key on 'time' for the specified table.
LJ::Entry::new — Gets a journal entry.
LJ::FBUpload::do_upload — Uploads an image to FotoBilder from LiveJournal.
LJ::Faq::has_summary — Tests whether instance has a summary
LJ::Faq::lang_update_in_place — Fill in question, summary and answer from database for one or more FAQs.
LJ::Faq::load — Creates a LJ::Faq object and populates it from the database.
LJ::Faq::load_all — Creates LJ::Faq objects from all FAQs in the database.
LJ::Faq::load_matching — Finds all FAQs containing a search term and ranks them by relevance.
LJ::Faq::new — Creates a LJ::Faq object from supplied information.
LJ::Faq::render_in_place — Render one or more FAQs by expanding FAQ-specific mark-up.
LJ::JSUtil::autocomplete — given the name of a form filed and a list of strings, return the JavaScript needed to turn on autocomplete for the given field.
LJ::Memories::add_hash — Add values of one hash, to the corresponding entries in another.
LJ::Memories::clear_memcache — Deletes memcached keyword data.
LJ::Memories::count — Returns the number of memories that a user has.
LJ::Memories::create — Create a new memory for a user.
LJ::Memories::delete_by_id — Deletes a bunch of memories by memid.
LJ::Memories::get_by_ditemid — Get memory for a given journal entry.
LJ::Memories::get_by_id — Get memories given some memory ids.
LJ::Memories::get_by_keyword — Get memories given a user and a keyword/keyword id.
LJ::Memories::get_by_user — Get memories given a user.
LJ::Memories::get_keyword_counts — Get a list of keywords and the counts for memories, showing how many memories are under each keyword.
LJ::Memories::get_keywordids — Get all keyword ids a user has used for a certain memory.
LJ::Memories::get_keywords — Retrieves keyword/keyids without big joins, returns a hashref.
LJ::Memories::update_memory — Updates the description and security of a memory.
LJ::Memories::updated_keywords — Deletes memcached keyword data.
LJ::ParseFeed::parse_feed — Parses an RSS/Atom feed.
LJ::RelationService::MysqlAPI::_mod_rel_multi — Sets/Clears relationship edges for lists of user tuples.
LJ::S1::get_themeid — Loads or returns cached version of given color theme data.
LJ::S1w2::date_s2_to_s1 — Convert an S2 Date or DateTime object into an S1 date hash.
LJ::S1w2::prepare_currents — do all the current music/mood/weather/whatever stuff. only used by ljviews.pl.
LJ::S2::get_tags_text — Gets text for display in entry for tags compatibility.
LJ::Schools::add_pending_school — Adds a school from a user to the pending list of schools.
LJ::Schools::approve_pending — Takes a bunch of pending rows and approves them as a new target school.
LJ::Schools::canonical_city_name — Canonicalizes a cities name to a standard format.
LJ::Schools::canonical_school_name — Canonicalizes a school name to a standard format.
LJ::Schools::delete_attended — Removes an attended edge from a user/school.
LJ::Schools::delete_school — Deletes an approved school
LJ::Schools::determine_location_opts — Internal; used to perform the logic to determine the location codes to use for a record based on the inputs.
LJ::Schools::edit_school — Edits the information for a school.
LJ::Schools::expand_codes — Expands country, state, and city codes into actual names.
LJ::Schools::find_existing — Finds an existing school by given criteria.
LJ::Schools::get_attended — Gets a list of schools a user has attended.
LJ::Schools::get_attendees — Gets a list of users that attended a school.
LJ::Schools::get_cities — Gets information about what cities have been populated with schools.
LJ::Schools::get_countries — Get a list of countries that we have schools in.
LJ::Schools::get_pending — Returns the next "potentially good" set of records to be processed.
LJ::Schools::get_schools — Gets schools defined in a given area.
LJ::Schools::get_states — Gets information about what states have been populated with schools. States and provinces are considered the same thing.
LJ::Schools::load_schools — Returns detailed information about schools.
LJ::Schools::merge_schools — Merges schools into one record.
LJ::Schools::reject_pending — Deletes pending schools.
LJ::Schools::rename_city — Renames a city within a country and state.
LJ::Schools::rename_state — Renames a state within a country.
LJ::Schools::set_attended — Lists a school as being attended by a user or updates an existing edge.
LJ::Support::Stats::comma_formatter — Format a number with commas
LJ::Support::Stats::date_formatter — Format a date
LJ::Support::Stats::filter_support_by_category — Filter Support by Category ID.
LJ::Support::Stats::get_grains_from_seconds — Determine the grains (day/week/month/year) of given a date
LJ::Support::Stats::percent_formatter — Format a percentage: Take integer portion and append percent sign.
LJ::Support::get_category_stocks — Get stock answers for specified category
LJ::Support::get_latest_screen — Get screened replies between approve one and the previous answer
LJ::Support::get_latest_touch — Get latest touch of any time for specified reuqest
LJ::Support::get_mapped_admin_urls — Return a list of admin tools from the map, available to user
LJ::Support::get_previous_screened_replies — Get screened replies between approve one and the previous answer
LJ::Support::get_request_log — Get data from supportlog with special mark to
LJ::Support::get_stock_answer_catid — Get support category id for specified stock answer
LJ::Support::get_support_by_daterange — Get all the support rows based on a date range.
LJ::Support::get_support_by_ids — Get all the support rows based on a list of Support IDs
LJ::Support::get_supportlogs — Get all the supportlog rows for a list of Support IDs.
LJ::Support::get_touch_supportlogs_by_user_and_date — Get all touch (non-req) supportlogs based on User ID and Date Range.
LJ::Support::get_touches_by_type — Get support request replies of particular type
LJ::Support::is_helper — Check if user answered to the request
LJ::Support::slow_query_dbh — Retrieve a database handle to be used for support-related slow queries... defaults to 'slow' role but can be overriden by @LJ::SUPPORT_SLOW_ROLES.
LJ::Tags::can_add_entry_tags — Determines if user is allowed to add tags to (edit tags of) an individual entry.
LJ::Tags::can_add_new_tag — Determines if journal's tags limit is not exceeded
LJ::Tags::can_add_tags — Determines if one account is allowed to add tags to another's entry.
LJ::Tags::can_control_tags — Determines if one account is allowed to control (add, edit, delete) the tags of another.
LJ::Tags::can_merge_tags — Determines if one account is allowed to merge (merge or rename) the tags of another.
LJ::Tags::clean_logtagsrecent — Clean logtagsrecent table
LJ::Tags::create_usertag — Creates tags for a user, returning the keyword ids allocated.
LJ::Tags::delete_logtags — Deletes all tags on an entry.
LJ::Tags::delete_usertags — Deletes a tag for a user, and all mappings.
LJ::Tags::deleted_friend_group — Called from ljprotocol when a friends group is deleted.
LJ::Tags::get_logtags — Gets tags that have been used on an entry.
LJ::Tags::get_logtagsmulti — Load tags on a given set of entries
LJ::Tags::get_permission_levels — Gets the permission levels on an account.
LJ::Tags::get_security_breakdown — Returns a list of security levels that apply to the given security information.
LJ::Tags::get_usertags — Returns the tags that a user has defined for their account.
LJ::Tags::get_usertagsmulti — Gets a bunch of tags for the specified list of users.
LJ::Tags::is_valid_tagstring — Determines if a string contains a valid list of tags.
LJ::Tags::merge_usertags — Merge tags
LJ::Tags::recalculate_logkwsum — Recalculate count of entries for tag
LJ::Tags::rename_usertag — Deletes a tag for a user, and all mappings.
LJ::Tags::reset_cache — Clears out all cached information for a user's tags.
LJ::Tags::set_usertag_display — Set the display bool for a tag.
LJ::Tags::update_logtags — Updates the tags on an entry. Tags not in the list you provide are deleted.
LJ::Tags::validate_tag — Check the validity of a single tag.
LJ::Talk::Post::require_captcha_test — returns true if user must answer CAPTCHA (human test) before posting a comment
LJ::Talk::can_delete — Determines if a user can delete a comment or entry: You can delete anything you've posted. You can delete anything posted in something you own (i.e. a comment in your journal, a comment to an entry you made in a community). You can also delete any item in an account you have the "A"dministration edge for.
LJ::Talk::delete_author — Deletes all comments of one author for one entry.
LJ::Talk::delete_comment — Deletes a single comment.
LJ::Talk::delete_thread — Deletes an entire thread of comments.
LJ::Talk::freeze_comments — Freezes comments. This is the internal helper function called by freeze_thread/unfreeze_thread. Use those if you wish to freeze or unfreeze a thread. This function just freezes specific comments.
LJ::Talk::freeze_thread — Freezes an entire thread of comments.
LJ::Talk::get_comments_in_thread — Gets a list of comment ids that are contained within a thread, including the comment at the top of the thread. You can also limit this to only return comments of a certain state.
LJ::Talk::get_talk2_row — Gets a row of data from talk2.
LJ::Talk::get_talk2_row_multi — Gets multiple rows of data from talk2.
LJ::Talk::get_thread_html
LJ::Talk::screening_level — Determines the screening level of a particular post given the relevant information.
LJ::Talk::unfreeze_thread — unfreezes an entire thread of comments.
LJ::Text->wrap_urls — Wrap URLs into "a href" <a href="[URL]">[URL]</a>
LJ::TimeUtil->ago_text — Converts integer seconds to English time span
LJ::TimeUtil->alldatepart_s1 — Gets date in MySQL format, produces s1dateformat.
LJ::TimeUtil->alldatepart_s2 — Gets date in MySQL format, produces s2dateformat.
LJ::TimeUtil->days_in_month — Figures out the number of days in a month.
LJ::TimeUtil->http_to_time — Converts HTTP date to Unix time.
LJ::TimeUtil->mysql_time
LJ::TimeUtil->statushistory_time — Convert a time like "20070401120323" to "2007-04-01 12:03:23".
LJ::TimeUtil->time_to_cookie — Converts Unix time to format expected in a Set-Cookie header.
LJ::TimeUtil->time_to_http — Converts a Unix time to a HTTP date.
LJ::User::activate_userpics — Sets/unsets userpics as inactive based on account caps.
LJ::User::caps_icon — get the icon for a user's cap.
LJ::User::dudata_set — Record or delete disk usage data for a journal.
LJ::User::get_friends_birthdays — get the upcoming birthdays for friends of a user. shows birthdays 3 months away by default pass in full => 1 to get all friends' birthdays.
LJ::User::get_reader_weight — returns reader_weight of user
LJ::User::get_renamed_user — Get the actual user of a renamed user
LJ::User::large_journal_icon — get the large icon by journal type.
LJ::User::mogfs_userpic_key — Make a mogilefs key for the given pic for the user.
LJ::User::rename_identity — Change an identity user's 'identity', update DB, clear memcache and log change.
LJ::_get_rel_memcache — Helper function: returns memcached value for a given (userid, targetid, type) triple, if valid.
LJ::_set_rel_memcache — Helper function: sets memcache values for a given (userid, targetid, type) triple
LJ::accept_comm_invite — Accepts an invitation a user has received. This does all the work to make the user join the community as well as sets up privileges.
LJ::acct_code_check — Checks the validity of a given account code
LJ::acct_code_decode — Breaks an account code down into its two parts
LJ::acct_code_encode — Given an account ID integer and a 5 digit auth code, returns a 12 digit account code.
LJ::acct_code_generate — Creates invitation code(s) from an optional userid for use by anybody.
LJ::acid_decode — Given an acid encoding from LJ::acid_encode, returns the original decimal number.
LJ::acid_encode — Given a decimal number, returns base 30 encoding using an alphabet of letters & numbers that are not easily mistaken for each other.
LJ::activate_userpics — des: Wrapper around LJ::User::activate_userpics for compatibility.
LJ::alldateparts_to_hash — Given a date/time format from MySQL, breaks it into a hash.
LJ::approve_pending_member — Approves someone's request to join a community. This updates the authactions table as appropriate as well as does the regular join logic. This also generates an e-mail to be sent to the user notifying them of the acceptance.
LJ::are_hooks — Returns true if the site has one or more hooks installed for the given hookname.
LJ::auto_linkify — Takes a plain-text string and changes URLs into <a href> tags (auto-linkification).
LJ::bad_input — Returns common BML for reporting form validation errors in a bulleted list.
LJ::bit_breakdown — Breaks down a bitmask into an array of bits enabled.
LJ::blocking_report — Log a report on the total amount of time used in a slow operation to a remote host via UDP.
LJ::can_manage_other — Given a user and a target user, will determine if the first user is an admin for the target user, but not if the two are the same.
LJ::can_view — Checks to see if the remote user can view a given journal entry. Note: This is meant for use on single entries at a time, not for calling many times on every entry in a journal.
LJ::canonical_username — normalizes username.
LJ::check_email — checks for and rejects bogus e-mail addresses.
LJ::check_form_auth — Verifies form authentication created with LJ::form_auth.
LJ::check_priv — Check to see if a user has a certain privilege.
LJ::check_referer — Checks if the user is coming from a given URI.
LJ::check_rel — Checks whether two users are in a specified relationship to each other.
LJ::clear_caches — This function is called from a HUP signal handler and is intentionally very very simple (1 line) so we don't core dump on a system without reentrant libraries. It just sets a flag to clear the caches at the beginning of the next request (see LJ::handle_caches). There should be no need to ever call this function directly.
LJ::clear_hooks — Removes all hooks.
LJ::clear_rel — Deletes a relationship between two users or all relationships of a particular type for one user, on either side of the relationship.
LJ::clear_rel_multi — Clear relationship edges for lists of user tuples.
LJ::cmize::display_current_summary — HTML helper function: Returns a block of HTML that summarizes the user's current display options.
LJ::cmize::get_moodtheme_select_list — Spoof checking for mood theme ids
LJ::cmize::get_style_thumbnails — Get style thumbnail information from per-process caches, or load if not available.
LJ::cmize::html_save — HTML helper function: Common HTML for the "save changes" button in a tab.
LJ::cmize::html_tablinks — HTML helper function: Common HTML for links on top of tabs.
LJ::cmize::js_redirect — Function to determine the correct redirect when clicking on a tab link.
LJ::cmize::s1_get_customcolors — Gets style list (S1).
LJ::cmize::s1_get_style_list — Gets style list (S1).
LJ::cmize::s1_get_theme_list — Gets style list (S1).
LJ::cmize::s2_custom_layer_list — custom layers will be shown in the "Custom Layers" and "Disabled Layers" groups depending on the user's account status. if they don't have the s2styles cap, then they will have all layers disabled, except for the one they are currently using.
LJ::cmize::s2_get_lang — Gets the lang code for the user's style
LJ::cmize::s2_implicit_style_create — Common "create s2 style" skeleton.
LJ::cmize::validate_moodthemeid — Spoof checking for mood theme ids
LJ::color_fromdb — Takes a value of unknown type from the DB and returns an #rrggbb string.
LJ::color_todb — Takes an #rrggbb value and returns a 24-bit decimal number.
LJ::comm_join_request — Registers an authaction to add a user to a community and sends an approval email to the maintainers
LJ::convert_href_props
LJ::create_account — Creates a new basic account. Note: This function is not really too useful but should be extended to be useful so htdocs/create.bml can use it, rather than doing the work itself.
LJ::create_qr_div — Creates the hidden div that stores the QuickReply form.
LJ::date_to_view_links — Returns HTML of date with links to user's journal.
LJ::decode_url_string — Parse URL-style arg/value pairs into a hash.
LJ::delete_all_comments — deletes all comments from a post, permanently, for when a post is deleted
LJ::delete_comments — deletes comments, but not the relational information, so threading doesn't break
LJ::delete_entry — Deletes a user's journal entry
LJ::dhtml — Remove HTML-escaping
LJ::did_post — Cookies should only show pages which make no action. When an action is being made, check the request coming from the remote user is a POST request.
LJ::disconnect_dbs — Clear cached DB handles
LJ::display_soccap — Encode social capital into nice look text
LJ::do_to_cluster — Given a subref, this function will pick a random cluster and run the subref, passing it the cluster id. If the subref returns a 1, this function will exit with a 1. Else, the function will call the subref again, with the next cluster.
LJ::durl — Decodes a value that's URL-escaped. See also LJ::eurl.
LJ::ecvs — Escapes a string value before it can be put in .csv file.
LJ::ehtm — Escapes a value before it can be put in HTML. Modified ehtml. Don't encode & if it parth of mnemonic.
LJ::ehtml — Escapes a value before it can be put in HTML.
LJ::ejs — Escapes a string value before it can be put in JavaScript.
LJ::end_request — Clears cached DB handles (if $LJ::DISCONNECT_DBS is true), and disconnects memcached handles (if $LJ::DISCONNECT_MEMCACHE is true).
LJ::entry_form — Returns a properly formatted form for creating/editing entries.
LJ::entry_form_decode — Decodes an entry_form into a protocol-compatible hash.
LJ::error_list — Returns an error bar with bulleted list of errors.
LJ::error_noremote — Returns an error telling the user to log in.
LJ::etags — Escapes < and > from a string
LJ::eurl — Escapes a value before it can be put in a URL. See also LJ::durl.
LJ::exml — Escapes a value before it can be put in XML.
LJ::expand_embedded — Used for expanding embedded content like polls, for entries.
LJ::expunge_userpic — Expunges a userpic so that the system will no longer deliver this userpic. If your site has off-site caching or something similar, you can also define a hook "expunge_userpic" which will be called with a picid and userid when a pic is expunged.
LJ::fetch_userpic — Fetch source content of userpic by url or post
LJ::fill_groups_xmlrpc — Fills a hashref (presumably to be sent to an XML-RPC client, e.g. FotoBilder) with user friend group information
LJ::fill_var_props — S1 utility function to interpolate %%variables%% in a variable. If a modifier is given like %%foo:var%%, then LJ::fvp_transform is called.
LJ::flush_cleanup_handlers — Runs all cleanup handlers registered in @LJ::CLEANUP_HANDLERS
LJ::form_auth — Creates an authentication token to be used later to verify that a form submission came from a particular user.
LJ::fvp_transform — Called from LJ::fill_var_props to do transformations.
LJ::get_authas_list — Get a list of usernames a given user can authenticate as.
LJ::get_authas_user — Given a username, will return a user object if remote is an admin for the username. Otherwise returns undef.
LJ::get_bio — gets a user bio, from DB or memcache.
LJ::get_cap — Given a user object, capability class key or capability class bit mask and a capability/limit name, returns the maximum value allowed for given user or class, considering all the limits in each class the user is a part of.
LJ::get_cap_min — Just like LJ::get_cap, but returns the minimum value. Although it might not make sense at first, some things are better when they're low, like the minimum amount of time a user might have to wait between getting updates or being allowed to refresh a page.
LJ::get_cluster_def_reader — Returns a definitive cluster reader for a given user, used when the caller wants the master handle, but will only use it to read.
LJ::get_cluster_description — Get descriptive text for a cluster id.
LJ::get_cluster_master — Returns a cluster master for a given user, used when the caller might use it to do a write (insert/delete/update/etc...)
LJ::get_cluster_reader — Returns a cluster slave for a user, or cluster master if no slaves exist.
LJ::get_community_moderation_queue — Gets a list of hashrefs for posts that people have requested to be posted to a community but have not yet actually been approved or rejected.
LJ::get_community_row — Gets data relevant to a community such as their membership level and posting access.
LJ::get_dbh — Given one or more roles, returns a database handle.
LJ::get_dbirole_dbh — Internal function for get_dbh(). Uses the DBIRole to fetch a dbh, with hooks into db stats-generation if that's turned on.
LJ::get_friend_group — Returns friendgroup row(s) for a given user.
LJ::get_friend_items — Return friend items for a given user, filter, and period.
LJ::get_friends — Returns friends rows for a given user.
LJ::get_keyword_id — Get the id for a keyword.
LJ::get_lastcomment — Looks up the last talkid and journal the remote user posted in.
LJ::get_lock — get a MySQL lock on a given key/dbrole combination.
LJ::get_logtext2 — Efficiently retrieves a large number of journal entry text, trying first slave database servers for recent items, then the master in cases of old items the slaves have already disposed of. See also: LJ::get_talktext2.
LJ::get_logtext2multi — Gets log text from clusters.
LJ::get_mood_picture — Loads a mood icon hashref given a themeid and moodid.
LJ::get_newids — Lookup an old global ID and see what journal it belongs to and its new ID.
LJ::get_pending_invites — Gets a list of pending invitations for a user to join a community.
LJ::get_pending_members — Gets a list of userids for people that have requested to be added to a community but have not yet actually been approved or rejected.
LJ::get_pic_from_keyword — Given a userid and keyword, returns the pic row hashref.
LJ::get_post_ids — Given a user object and some options, return the number of posts or the posts'' IDs (jitemids) that match.
LJ::get_posts_raw — Gets raw post data (text and props) efficiently from clusters.
LJ::get_postto_list — Get the list of usernames a given user can post to.
LJ::get_prop — This is used to retrieve a hashref of a row from the given tablename's proplist table. One difference from getting it straight from the database is that the 'id' key is always present, as a copy of the real proplist unique id for that table.
LJ::get_recent_items — Returns journal entries for a given account.
LJ::get_remote — authenticates the user at the remote end based on their cookies and returns a hashref representing them.
LJ::get_sent_invites — Get a list of sent invitations from the past 30 days.
LJ::get_shared_journals — Gets an array of shared journals a user has access to.
LJ::get_talktext2 — Retrieves comment text. Tries slave servers first, then master.
LJ::get_times_multi — Get the last update time and time create.
LJ::get_timeupdate_multi — Get the last time a list of users updated.
LJ::get_timezone — Gets the timezone offset for the user.
LJ::get_urls — Returns a list of all referenced URLs from a string.
LJ::get_userid — Returns a userid given a username.
LJ::get_username — Returns a username given a userid.
LJ::get_userpic_info — Given a user, gets their userpic information.
LJ::handle_caches — clears caches if the CLEAR_CACHES flag is set from an earlier HUP signal that called LJ::clear_caches, otherwise does nothing.
LJ::help_icon — Returns BML to show a help link/icon given a help topic, or nothing if the site hasn't defined a URL for that topic. Optional arguments include HTML/BML to place before and after the link/icon, should it be returned.
LJ::html_check — Creates HTML checkbox button, and radio button controls.
LJ::html_color — A text field with attached color preview and button to choose a color.
LJ::html_datetime — Creates date and time control HTML form elements.
LJ::html_datetime_decode — Parses output of HTML form controls generated by LJ::html_datetime.
LJ::html_hidden — Makes the HTML for a hidden form element.
LJ::html_newlines — Replace newlines with HTML break tags.
LJ::html_select — Creates a drop-down box or listbox HTML form element (the <select> tag).
LJ::html_submit — Makes the HTML for a submit button.
LJ::html_text — Creates a text input field, for single-line input.
LJ::html_textarea — Creates a text box for multi-line input (the <textarea> tag).
LJ::html_trim_4gadgets — truncate string according to requirements on char length.
LJ::img — Returns an HTML <img> or <input> tag to an named image code, which each site may define with a different image file with its own dimensions. This prevents hard-coding filenames & sizes into the source. The real image data is stored in LJ::Img, which has default values provided in cgi-bin/imageconf.pl but can be overridden in etc/ljconfig.pl.
LJ::is_ascii — checks if text is pure ASCII.
LJ::is_banned — Checks to see if a user is banned from a journal.
LJ::is_friend — Checks to see if a user is a friend of another user.
LJ::is_utf8 — check text for UTF-8 validity.
LJ::is_valid_authaction — Validates a shared secret (authid/authcode pair)
LJ::item_link — Returns URL to view an individual journal item.
LJ::item_toutf8 — convert one item's subject, text and props to UTF-8. item can be an entry or a comment (in which cases props can be left empty, since there are no 8bit talkprops).
LJ::join_community — Makes a user join a community. Takes care of all reluser relationships and friend stuff.
LJ::journal_base — Returns URL of a user's journal.
LJ::leave_community — Makes a user leave a community. Takes care of all reluser relationships and friend stuff.
LJ::ljuser — Make link to userinfo/journal of user.
LJ::load_codes — Populates hashrefs with lookup data from the database or from memory, if already loaded in the past. Examples of such lookup data include state codes, country codes, color name/value mappings, etc.
LJ::load_log_props2
LJ::load_log_props2multi
LJ::load_mood_theme — Loads and caches a mood theme, or returns immediately if already loaded.
LJ::load_moods
LJ::load_props — Loads and caches one or more of the various *proplist tables: logproplist, talkproplist, and userproplist, which describe the various meta-data that can be stored on log (journal) items, comments, and users, respectively.
LJ::load_rel_target — Load user relationship information. Loads all relationships of type 'type' in which user 'targetid' participates on the right side (is the target of the relationship).
LJ::load_rel_user — Load user relationship information. Loads all relationships of type 'type' in which user 'userid' participates on the left side (is the source of the relationship).
LJ::load_rel_user_cache — Loads user relationship information of the type 'type' where user 'targetid' participates on the left side (is the source of the relationship) trying memcache first. The results from this sub should be treated as inaccurate and out of date.
LJ::load_state_city_for_zip — Fetches state and city for the given zip-code value
LJ::load_talk_props2
LJ::load_user — Loads a user record, from the user table, given a username.
LJ::load_user_privs — loads all of the given privs for a given user into a hashref, inside the user record. See also LJ::check_priv.
LJ::load_user_props — Given a user hashref, loads the values of the given named properties into that user hashref.
LJ::load_userid — Loads a user record, from the user table, given a userid.
LJ::load_userids — Simple interface to LJ::load_userids_multiple.
LJ::load_userids_multiple — Loads a number of users at once, efficiently.
LJ::load_userpics — Loads a bunch of userpics at once.
LJ::make_auth_code — Makes a random string of characters of a given length.
LJ::make_authas_select — Given a u object and some options, determines which users the given user can switch to. If the list exists, returns a select list and a submit button with labels. Otherwise returns a hidden element.
LJ::make_cookie — Prepares cookie header lines.
LJ::make_link — Takes a group of key=value pairs to append to a URL.
LJ::make_postto_select — Given a u object and some options, determines which users the given user can post to. If the list exists, returns a select list and a submit button with labels. Otherwise returns a hidden element.
LJ::make_qr_link — Creates the link to toggle the QR reply form or if JavaScript is not enabled, then forwards the user through to replyurl.
LJ::make_qr_target — Returns a div usable for QuickReply boxes.
LJ::make_user_active — Record user activity per cluster, on clustertrack2, to make per-activity cluster stats easier.
LJ::mark_as_spam — Copies a message into the global spamreports table.
LJ::mark_authaction_used — Marks an authaction as being used.
LJ::mark_comment_as_spam — Copies a comment into the global spamreports table.
LJ::mark_entry_as_spam — Copies an entry in a community into the global spamreports table.
LJ::may_lock — see if we could get a MySQL lock on a given key/dbrole combination, but don't actually get it.
LJ::memcache_kill — Kills a memcache entry, given a userid and type.
LJ::modify_caps — Given a list of caps to add and caps to remove, updates a user's caps.
LJ::name_caps — Given a user's capability class bit mask, returns a site-specific string representing the capability class name.
LJ::name_caps_short — Given a user's capability class bit mask, returns a site-specific short string code.
LJ::new_account_cluster — Which cluster to put a new account on. $DEFAULT_CLUSTER if it's a scalar, random element from $LJ::DEFAULT_CLUSTER if it's arrayref. also verifies that the database seems to be available.
LJ::parse_vars — Parses S1 style data into hashref.
LJ::prepare_currents — do all the current music/mood/weather/whatever stuff. only used by ljviews.pl.
LJ::procnotify_add — Sends a message to all other processes on all clusters.
LJ::procnotify_callback — Call back function process notifications.
LJ::ratecheck_multi — takes a list of msg objects and sees if they will collectively pass the rate limit check.
LJ::record_anon_comment_ip — Records the IP address of an anonymous comment.
LJ::register_authaction — Registers a secret to have the user validate.
LJ::register_hook — Installs a site-specific hook.
LJ::register_setter — Installs code to run for the "set" command in the console.
LJ::reject_comm_invite — Rejects an invitation a user has received.
LJ::reject_pending_member — Rejects someone's request to join a community. Updates authactions and generates an e-mail to the user.
LJ::release_lock — release a MySQL lock on a given key/dbrole combination.
LJ::remote_has_priv — Check to see if the given remote user has a certain privilege.
LJ::repost_auth — Creates an authentication token to be used later to verify that a form hidden field "repost" not modified by user
LJ::revoke_invites — Revokes a list of outstanding invitations to a community.
LJ::robot_meta_tags — Returns meta tags to instruct a robot/crawler to not index or follow links.
LJ::run_hook — Runs single site-specific hook of the given name.
LJ::run_hooks — Runs all the site-specific hooks of the given name.
LJ::send_comm_invite — Sends an invitation to a user to join a community with the passed abilities.
LJ::send_mail — Sends email. Character set will only be used if message is not ASCII.
LJ::server_down_html — Returns an HTML server down message.
LJ::set_interests — Change a user's interests.
LJ::set_lastcomment — Sets the lastcomm memcached key for this user's last comment.
LJ::set_rel — Sets relationship information for two users.
LJ::set_rel_multi — Sets relationship edges for lists of user tuples.
LJ::shared_member_request — Registers an authaction to add a user to a shared journal and sends an approval e-mail.
LJ::site_schemes — Returns a list of available BML schemes.
LJ::start_request — Before a new web request is obtained, this should be called to determine if process should die or keep working, clean caches, reload config files, etc.
LJ::statushistory_add — Adds a row to a user's statushistory
LJ::strip_bad_code — Removes malicious/annoying HTML.
LJ::sysban_block — Notes a sysban in statushistory and returns a fake HTTP error message to the user.
LJ::sysban_check — Given a 'what' and 'value', checks to see if a ban exists.
LJ::sysban_create — creates a sysban.
LJ::sysban_note — Inserts a properly-formatted row into statushistory noting that a ban has been triggered.
LJ::sysban_validate — determines whether a sysban can be added for a given value.
LJ::text_compress — Compresses a chunk of text, to gzip, if configured for site. Can compress a scalarref in place, or return a compressed copy. Won't compress if value is too small, already compressed, or size would grow by compressing.
LJ::text_convert — convert old entries/comments to UTF-8 using user's default encoding.
LJ::text_in — do appropriate checks on input text. Should be called on all user-generated text.
LJ::text_length — returns both byte length and character length of a string. In a non-Unicode environment, this means byte length twice. In a Unicode environment, the function assumes that its argument is a valid UTF-8 string.
LJ::text_out — force outgoing text into valid UTF-8.
LJ::text_trim — truncate string according to requirements on byte length, char length, or both. "char length" means number of UTF-8 characters if $LJ::UNICODE is set, or the same thing as byte length otherwise.
LJ::text_uncompress — Uncompresses a chunk of text, from gzip, if configured for site. Can uncompress a scalarref in place, or return a compressed copy. Won't uncompress unless it finds the gzip magic number at the beginning of the text.
LJ::trim — Removes whitespace from left and right side of a string.
LJ::trusted — Checks to see if the remote user can use javascript in S2 layers.
LJ::u_equals — Compares two user objects to see if they are the same user.
LJ::use_diff_db — given two DB roles, returns true only if it is certain the two roles are served by different database servers.
LJ::user_caps_icon — Given a user's capability class bit mask, returns site-specific HTML with the capability class icon.
LJ::userpic_count — Gets a count of userpics for a given user.
LJ::want_user — Returns user object when passed either userid or user object. Useful to functions that want to accept either.
LJ::want_userid — Returns userid when passed either userid or the user hash. Useful to functions that want to accept either. Forces its return value to be a number (for safety).
LJ::warning_list — Returns a warning bar with bulleted list of warnings.
LJ::wipe_major_memcache — invalidate all major memcache items associated with a given user.
PersonalStats::Ratings::Journals::get_rating_position — make request to rating db to take position of journal
PersonalStats::Ratings::Journals::get_rating_segment — make request to rating db and prepare response
PersonalStats::Ratings::Journals::get_rating_total — make request to rating db to take count of rating rows
PersonalStats::Ratings::Posts::Page::get_rating_position — make request to rating db to take position of entry
PersonalStats::Ratings::Posts::get_rating_position — make request to rating db to take position of entry
PersonalStats::Ratings::Posts::get_rating_segment — make request to rating db to take segment of rating
PersonalStats::Ratings::Posts::get_rating_total — make request to rating db to take count of rating rows
_get_upf_scaled — Crop and scale images returns status 'small' source => \$content, size => [ "140x105" ], save_to_FB => 1, fb_gallery => 'test_gal', auto_crop => 1,
get_ad_html — returns ad html for a given ad location
ljuser_display — Make link to userinfo/journal of user.
should_show_ad — returns if there is ad html for a given ad location