Jump to content

Search the Community

Showing results for tags 'ips'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • The Initiative Services and Features
  • Forum Building and Management
  • Writing Materials
  • Being a Member
  • Software
    • IPS Character Manager
  • Coding
  • Graphics

Categories

  • Roleplay Search
  • Writing Partner Search
  • Character Home Search

Categories

  • General Update
  • Announcement
  • Articles
  • Feedback
  • Tomfoolery

Categories

  • Application Templates
  • Plotters
  • Post Templates
  • Staff Templates
  • Thread Trackers
  • Other
  • Pending Challenge Entries
  • Past Challenge Entries

Categories

  • Active Challenges
  • Archived Challenges

Categories

  • Communications
  • Contributions
  • Operations

Categories

  • Jcink Themes
  • ProBoards/FreeForums Themes
  • MyBB Themes
  • IPS Themes
  • SMF Themes
  • phpBB Themes
  • Other Themes
  • Modifications
  • Make My Life Make Sense's Files
  • Dragonriders of Pern Boards's Files
  • PHPBB Staff people's Files
  • Xenforo Staff People's Files
  • Cyberpunk and Transhumanism's Files

Blogs

  • Morrigan's Madness
  • Staff Blog
  • A pirate captain's log
  • Somnia News
  • Ghost's One-Shots
  • Bits & Bones.
  • Amelia's Blog
  • Mobydoll's Blog
  • a medieval world
  • Just a girl and her stuff....
  • Everything Super
  • Icewolf's Musings
  • Ask GR - advice for RPers
  • Loose Ends
  • Tales From The Shoebox
  • Thoughts on Roleplay
  • Salt Box
  • The Salt Mine
  • Little bit of Gothic
  • The Totally Epic and True Tales of Kit the Human
  • Obvious Blog Is Obvious
  • Fountain of Thoughts
  • Please Turn The Device Off and Back On
  • gbwhatsapp apk
  • The Veritas
  • That Necromancer Life
  • Back to the narrative jungle
  • Make My Life Make Sense's Blog
  • Dragonriders of Pern Boards's Blog
  • Cryptozoology's Blog
  • Cyberpunk and Transhumanism's Blog

Calendars

  • Community Calendar
  • Character Birthdays
  • Book Club's Events
  • Make My Life Make Sense's Events
  • Dragonriders of Pern Boards's Events
  • NaNoWriMo's Virtual Write Ins
  • Cryptozoology's Events
  • Xenforo Staff People's Events
  • Cyberpunk and Transhumanism's Events

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Discord


Twitter


Skype


NaNo House


Game of Thrones House


Bending Nation

Found 3 results

  1. For some the character mods centering isn't exactly what they were looking for this guide is a means to show you that some minor alterations can make a big difference. So the first thing you're going to edit is the Mini Profile which is in characters > front > character > AuthorPane Search for: <li class="ipsType_light">{lang="character_owner"}: {$character->owner()->link()|raw}</li> {{foreach $character->customFieldsForDisplay( 'topic' ) as $field}} {{if !empty( $field['value'] )}} <li> {$field['title']}: {$field['value']|raw} </li> {{endif}} {{endforeach}} The title is the title of the field and the value is the what was entered. Now what I recommend is changing are a few things and by that I mean lets make it a details list instead of just a simple li. What you will do is change it to the following (note this includes changing the Player/owner so that it fits the scheme but is not required): <li> <dl class='charPane'> <dt>{lang="character_owner"}</dt> <dd>{$character->owner()->link()|raw}</dd> {{foreach $character->customFieldsForDisplay( 'topic' ) as $field}} {{if !empty( $field['value'] )}} <dt> {$field['title']}</dt> <dd>{$field['value']|raw} </dd> {{endif}} {{endforeach}} </dl> </li> From here it's just simple CSS to make the fields appear how you want. In the one I did the dt field is text-aligned left and the dd field is text-aligned right. We also probably want them on the same line so the following CSS accomplished all of that: .charPane { max-width: 275px; margin: 0 auto; } .charPane dt { width: 45%; display: inline-block; float: left; text-align: left; padding: 3px; font-weight: 700; } .charPane dd { width: 45%; display: inline-block; margin-left: 0; text-align: right; padding: 3px; } Mind you, your max-width should match what you have on your site so that it doesn't unintentionally overflow into the post. There is actually way more that you can do to make a very custom mini-profile just like on JCink (or here on the Initiative) and whatnot so look forward to another guide about it.
  2. WHO POSTED TODAY? a block for IPS forums, by Mousie Why "who posted"? You might opt to use a "who posted" block over "who was online" for one of two main reasons: You use a Linked Accounts mod that does not record users as being online even if they have posted. You want your guests to see not just who visited the site, but who actively participated. What qualifies as a "post"? This block makes use of the "member_last_post" column attached to the member row. This generates a new date stamp any time the user posts content on the forum. This includes: New posts New topics New status updates New replies to status updates New blogs New comments to blogs New database records New comments to database records So in effect, any contribution the member makes to the forum is counted as Activity. How do I install this block? You'll find the full code at the end of this post. In your ACP: Go to Pages --> Blocks Create New Block Select "type" as "Custom" Select "content editor" as "Manual PHP" Under "Details", give your block a name, description, and a template key. Under "Content", copy and paste the code at the end of this post. How do I display this block? This block is mainly designed to sit at the bottom of your forum, similar to how Who Was Online? does. You can display the block by: Opening the Page Builder menu using the > icon on the left side of your screen, and selecting the block to drag and drop where you would like it displayed. If you defined a template key, you can add the block by editing the page template and placing the "{block="my_block_key"}" in your HTML templates where you would like the block to display. If you can use Page Builder to get the block where you want it, that is usually the simplest method. How does it work? This block doesn't use data from any custom databases, so it should work for most IPS forums. You should be able to copy and paste it into a new block, place it on your forum, and it will work. However, when I began coding blocks I found it difficult to find examples of simple blocks that I could understand, and use to modify and build my own blocks. For that reason, I've broken down the code below to explain what each function does, and how it manipulates the data to get the desired result. 1. Establishing the time difference $rightnow = time(); $timevar = $rightnow - 86400; In the first line, we use the time() function to generate a unix timestamp - a number that is essentially a count of how many seconds have passed since 1/1/1970. As the function is undefined (there is no additional information between the parenthesis), it defaults to current time. It also says that whenever we use the variable $rightnow, that it is to use the datestamp created by the time function in that first line. In the second line, we instruct the system to subtract 86400 seconds from $rightnow, and call that number $timevar. Basically, we're asking the system to work out what the time is now, and take 24 hours off it. You can adjust that "86400" to whatever number you like, depending on what range you would like displayed on your block. Want posts from the past week? Subtract 604800 instead. 2. Accessing the member database // Get the select object $select = (\IPS\Db::i()->select('member_id, prefix, suffix, g_id, name, members_seo_name, member_group_id, member_last_post', 'core_members' )); Here we define a new variable, $select, that we will use to contain information from the member database. The important parts here are:\ $select - This is the variable that will store all of the information found by the select query below. (\IPS\Db::i() - This function, unique to IPS systems, tells the system that we're going to access information from the database. It's a nifty shortcut. ->select - This tells the system that we're going to choose some information from a particular database and store it in the $select variable we defined at the start of the line. In the parenthesis, we have the conditions of the select. The format is: ('{columns to select}', '{database}') There are other conditions that you can add to manipulate and refine your data, but this simple example only defines the columns and database. You can also use * as a wildcard to select all information from a particular database, eg select('*', 'core_members') will return all columns of information from the core_members table. 3. Join on group data $select = $select->join( 'core_groups', 'core_members.member_group_id=core_groups.g_id', 'LEFT'); This line is important if you want to style the output using the group colours you've defined in your system. Which you probably do, because it looks nifty. How this works, is it looks at both the core_members table, and the core_groups table (where all information about the groups is stored, including styling) and asks it to find where the member_group_id (from core_members) is the same as g_id (from core_groups). Then, in any row in core_members where those fields are the same, it adds columns to the row and populates them with the relevant data from core_groups. Sounds complicated, but you can see how it works in a plain SQL example. Important parts of this function are: $select - This is the same variable we used above. $select-->join - This says that we're going to take the data from the $select variable we created, and join more data on. Basically, we're updating the information contained in $select, and still calling that updated variable $select. In the parenthesis, again we have a set of conditions that will tell the system what data to find and how to join it. The format is ('{second_database}', '{first_database_column}={second_database_column}') 4. Begin the print print "<div class='ipsWidget ipsWidget_horizontal ipsBox'><h3 class='ipsType_reset ipsWidget_title'>Who Posted Today</h3><div style='padding: 10px;'>"; Here we start to build the HTML that will contain the information. The function "print" is an output function, it tells the system that what comes next is a visual output element. In PHP, you can use HTML code by encasing it in double quotation marks, as in the example above. To print the results of PHP variables, they must be placed outside of the quotation marks. You'll see more of that below. 5. Start analysing the data foreach( $select as $students ) { if ($students['member_last_post'] > $timevar) Here, we ask the system to look through each row in $select and compare it to a particular condition. foreach - This tells the system that we're not looking at $select as a whole, but each individual row contained within it ($select is essentially a table in itself, created by the data you have chosen). $select as $students - This tells the system that each $select row is now going to be called $students, allowing it to differentiate between $select the big group of data, and $students the row of data contained within. if - This tells the system that we're only going to proceed for rows that meet the conditions defined in the parenthesis. ($students['member_last_post'] > $timevar) - This is our condition. What it says is that any $students row where the column member_last_post (you'll remember this is the column that keeps the latest post datestamp) contains a higher value than $timevar (the variable defined at the beginning of the block) are going to be used in the next processes. $students rows that do not have a datestamp higher than $timevar (thus, did not post in the last 24 hours) will be skipped over. 6. Create a running count { $count = $count + 1; We also want to know how many people have posted today, so this keeps track. Every time a record is found that meets the condition, $count (which initially starts at 0) goes up by +1. This works because it is located inside the foreach, and after the if -- which means that it runs every time a record is found that meets the conditions of the if. 7. Print the member list print "<a href='/profile/" . $students['member_id'] . "-" . $students['members_seo_name'] . "'>" . $students['prefix'] . $students['name'] . $students['suffix'] . "</a>, "; }} Again we're using the print function, this time to create a linked and styled list. It looks a touch confusing, and may help if formatted like this. print "<a href='/profile/" . $students['member_id'] . "-" . $students['members_seo_name'] . "'>" . $students['prefix'] . $students['name'] . $students['suffix'] . "</a>, "; }} Here you can see more clearly where HTML is enclosed in quotation marks, and where PHP variables are being used. PHP variables are being used to help create the link itself, by accessing the member_id and members_seo_name columns. You can see again how the column name is defined after $students to get the right piece of data, eg $students['name'] returns the name of the account, while $students['member_id'] returns the member's id number. You can also see how the PHP variables are used when HTML is also being used. If you just want to print the contents of a variable, normally you would use print $variable; But because we want to mix PHP and HTML output, we need to do things a little differently. Any PHP variable that is used between or after a HTML sequence needs to have leading and following full stops. For instance: print "some html" . $variable . "some more html"; 8. Print the count and close off print "<br><span class='resultxc'>" . $count . " members posted today</span><br>"; print "</div></div>"; This simply prints the $count variable (the number of total people that posted in the last 24 hours), and closes off the rest of the HTML used throughout the block. Who Posted Today -- Block Code /** * Build SELECT statement * * @param array|string $columns The columns (as an array) to select or an expression * @param array|string $table The table to select from. Either (string) table_name or (array) ( name, alias ) or \IPS\Db\Select object * @param array|string|NULL $where WHERE clause - see \IPS\Db::compileWhereClause() for details * @param string|NULL $order ORDER BY clause * @param array|int $limit Rows to fetch or array( offset, limit ) * @param string|NULL|array $group Column(s) to GROUP BY * @param array|string|NULL $having HAVING clause (same format as WHERE clause) * @param int $flags Bitwise flags * @li \IPS\Db::SELECT_DISTINCT Will use SELECT DISTINCT * @li \IPS\Db::SELECT_SQL_CALC_FOUND_ROWS Will add SQL_CALC_FOUND_ROWS * @li \IPS\Db::SELECT_MULTIDIMENSIONAL_JOINS Will return the result as a multidimensional array, with each joined table separately * @li \IPS\Db::SELECT_FROM_WRITE_SERVER Will send the query to the write server (if read/write separation is enabled) * @return \IPS\Db\Select * */ $rightnow = time(); $timevar = $rightnow - 86400; // Get the select object $select = (\IPS\Db::i()->select('member_id, prefix, suffix, g_id, name, members_seo_name, member_group_id, member_last_post', 'core_members' )); $select = $select->join( 'core_groups', 'core_members.member_group_id=core_groups.g_id', 'LEFT'); print "<div class='ipsWidget ipsWidget_horizontal ipsBox'><h3 class='ipsType_reset ipsWidget_title'>Who Posted Today</h3><div style='padding: 10px;'>"; foreach( $select as $students ) { if ($students['member_last_post'] > $timevar) { $count = $count + 1; print "<a href='/profile/" . $students['member_id'] . "-" . $students['members_seo_name'] . "'>" . $students['prefix'] . $students['name'] . $students['suffix'] . "</a>, "; }} print "<br><span class='resultxc'>" . $count . " members posted today</span><br>"; print "</div></div>";
  3. HARNESSING THE POWER OF IPS PAGES a documentation by Mousie First of all, what is IPS Pages? Pages is a component of InvisionPower Service's community suite that allows you to create, store, and manipulate data outside of your main forum structure. Formerly known as IP.Content, the system has evolved into three main sections: Pages, Blocks and Databases. All three of these elements can be utilised to create features unique to your forum. At it's base, Pages is a content management system. The addition of custom databases and build-your-own PHP blocks means that Pages is far more than just a place to store your articles and other information. Some interesting ways to use Pages include: A character application system that takes information via a form, and outputs it to a beautiful character sheet (without the member needing to navigate any code) A job board that can be updated in just a few clicks A full timeline system that members can submit their own events to A play-by/face claim system that automatically lists all faces in use A fully automated scoring system that updates once an entry is submitted An enrollment/sign up system that can be searched and entries filtered And those are just the examples I've tried myself. Here on RPG Initiative, almost every feature is run through Pages. That's right! The RP Directory, Play-by Directory, Writing Partners, and yes--this guide you're reading right now!--are all built off the incredibly flexible Pages system. So let's break it down a little, and see what Pages has to offer. The three main elements As I said above, there are three main elements to Pages: Pages, Blocks and Databases. You can see here that Pages and Blocks are listed under Page Management, while Databases is listed under Content. But what exactly are they? Pages Pages is exactly what it sounds like---a function of the app that allows you to create custom HTML pages to display on your site. In most cases, you will create Pages to display Blocks or Databases, but you may also wish to use them to display content of your own coding. There are two ways to build a page: Page Builder: This allows you to use the > symbol at the left-hand side of the page to drag and drop premade blocks onto the page where you would like them to display. This is recommended for most pages, as drag and drop is way more fun than finding where you coded that pesky element into the template! Manual HTML: For complete control, or if you want to display content that is not contained in a block, you may choose to use the manual html option. In either case, you will be asked whether you want to use the "suite HTML wrapper", which basically means that you won't need to manually code in things like the header, footer, and other fun (but annoying) stuff. Blocks Blocks are essentially chunks of code that serve a particular purpose. Perhaps there's a list of links you would like to display in multiple locations on your site (but don't want to update five different versions of the list every time you want to add or remove a link), or you would like to display more dynamic content such as an online user list or recently updated topics. Blocks allow you to create a widget-like structure that you can drop into place, code into a template, and re-use as many times as you need to. Blocks can be placed in the sidebars of your forum system, beneath the forums, above the forums, beside and around databases, in fact--anywhere you can drop a block in Page Builder, or anywhere you can slip it into a template! In the example below, both the timeline listing and the timeline menu are constructed with Blocks. And here? Each of the house point scores (the numbers themselves) is its own block, nested within the larger House Points block (which is contained by the Header block) You can nest blocks to construct complex pages, which is useful if you'd like to divvy up your code so you can find what you need to edit easily. I have separate blocks for News, Events, our current banner, and so on. I hate reading through lines of code to find the segment I need to edit, and with Blocks I don't have to. So blocks can make building and updating your site a breeze, but that's not all they're good for. But first, let's look at the types of blocks you can create. Block types There are two main types of blocks that you can make use of: Custom: This allows you to use your own HTML and/or PHP to create the block and the output it will display. Plugin: This utilises existing feed sets to quickly build a block that suits your needs. The list of plugin blocks typically available includes things like users online, feeds from your databases, recent topic blocks, recent posts, status updates, and a whole range of other functions that are built into the board. This is not the full list, but you get the idea. If you choose to delve into Custom blocks, you'll get the following options: Editor: This is the WYSIWYG editor you get for posts. It's most powerful when being used for fancy formatted text and links. Manual HTML: Like the box says, here you can use your own HTML codes. Good for blocks that require more HTML structure than the Editor will do easily. These are ideal for structuring headers and menus. Manual PHP: Here the fun really starts. PHP blocks can access database information, manipulate data, and display information in a meaningful way. In the above example of the house points block, the point totals are never manually updated. They are calculated by a PHP block that displays the numbers in the header like magic) Getting your head around Blocks can be a challenge, but it's worth it! Databases The last of the main elements, Databases give you a whole new way to store and retrieve information. Within Pages, you can create an unlimited number of databases, each with their own custom fields, for almost any purpose you can think of. An RP forum might use a database to manage and display character bio sheets, to hold board and setting information, or to run a quotes and highlights system. Databases combined with PHP blocks to manipulate the data contained inside them can create a face claim list that updates when applications are approved (without needing to be edited? You read that right), and even the timeline system shown in the example above. Information contained in Databases is also given a higher priority/rank when indexed by search engines (unless your sitemap is configured differently). That means that Google is more likely to use this content to find and index keywords than it is most other content on your forums. Keeping your main information contained in an articles database is highly recommended. For all the versatility they offer, databases are relatively easy to set up. As said above, RPG Initiative makes use of databases in different ways across the board. The RPG Directory and Roleplaying Guides systems are two great examples of the same software being used in different ways to offer different services. Structuring Databases Databases can be set up very similar to forums, as categories that contain other categories. Or, you may choose to store all your records for a database together. There are pros and cons to both options. As database records can be filtered by certain fields (see below), you may find it useful not to have categories at all as members can use the filters to find the content they're looking for. Here at RPG Initiative, we affectionately call this the "Morrigan's Heathen Chaos method". Database Content Database content has three main components: the title, the content itself, and any additional custom fields. If enabled, you can also assign prefixes and tags to your database content (useful if you want to use a particular tag to mark your essential information, and so on). The title: will determine what the record is called in the display and listing templates, and must be a text string. The content: will be the primary chunk of information stored in the record, usually a longer piece of text (such as an article) or a description field. The custom fields: additional content that is not being used as the title or content. You can set a custom field to act as the title or content, depending on what type of field it is. Fields assigned title/content will display a little differently in the default templates. Custom fields I'm going to go into the custom fields available through Databases, even though (for the most part) they are the same fields found throughout the IPS suite. Many of these fields can also be used as custom fields in the Profile system of the core app. By combining different types of custom fields, and modifying templates to suit how you want the information from your database displayed, you can create automated lists, code-free applications, and easy ways for members to submit content for a variety of purposes. I have skipped over Spotify/Soundcloud and YouTube fields. In the examples below, a field that is "filterable" means that it can be used to search and narrow down results in the record filter block. "Unique" means the field can be set to only accept values that are unique in that database (eg. the field cannot contain the same content in more than one record). "Multiple selection" means that more than one answer can be selected/submitted. Address: A full address field. Filterable: No Unique: No Checkbox: A single checkbox that can either be ticked, or unticked. Filterable: No Unique: No Checkbox Set: A set of checkboxes that can be ticked or unticked. Filterable: Yes Unique: No Multiple Selection: Yes Code: A box that will accept code, and format it appropriately for display. Filterable: No Unique: No Date: A date field (optionally including time input). Goes back as far as 1901. Values stored in database as a Unix timestamp. Filterable: Yes Unique: No Allow time input: Yes Editor: The full WYSIWYG editor common to most posting areas of IPS. Allows for easy formatting of large text areas, HTML use, and an upload field (optional). Filterable: No Unique: No Email: An email address field that will only accept a valid email input. Filterable: No Unique: Yes Database Relationship: Select record(s) from another database on the system to connect with this record (example below shows linking to an available job post record). Outputs a direct link to the record(s) selected. Crosslink Records: Yes Multiple Selection: Yes Member: Select a member to link in the field. Outputs a linked and styled username display. Unique: Yes Multiple Selection: Yes Number: A field that can only be filled with a valid number input. Unique: Yes Filterable: No Password: Input converts to stars for privacy. Unique: No Filterable: No Radio: Radio select button, single answer only. Unique: Yes Filterable: Yes Select Box: Common drop-down style select box. Allows for multiple selections. Unique: Yes Filterable: Yes Multiple Selection: Yes Text: Single line text box. Unique: Yes Custom input validation: Yes Accept HTML: Yes Text Area: Multi-line simple text box. Unique: Yes Custom input validation: Yes Accept HTML: Yes Upload: Upload field for images and other files. Allow multiple uploads: Yes Thumbnail dimensions: Yes Image dimensions: Yes Images only or any files: Yes URL: URL input field that will only accept a valid URL. Unique: Yes Filterable: No Yes/No: Simple toggle switch, yes/no answer option. Unique: No Filterable: Yes Database templates Database templates determine how the information contained in your database will be displayed. You can have a variety of different templates assigned to different databases, which means you can design a look and feel that reflects the purpose of the database. Think about how the RPG Directory here looks and feels different to the Guides database. The template types are as follows: Category templates: this determines how the database categories will look and be displayed. Listing templates: this determines how the records look when in a list display. Display templates: this determines how the full record will display when on its own (think: character sheets, RPG listings). Add/edit form templates: this determines how the form to submit a record will look and feel. You can add and edit templates using the Templates section of Pages (note: not the main theming templates). Wrapping up Now that you've seen a little of what Pages contains and can do, hopefully you've got some amazing ideas! If you're not sure whether something is possible, post it below---let's see if we can figure it out! And I'd love to see your creative and innovative ways to use Pages, the greatest app in the IPS suite!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.