Jump to content
IPSGoza

Goza

Administrators
  • Posts

    496
  • Joined

  • Last visited

Goza's Achievements

Community Regular

Community Regular (8/14)

  • Dedicated
  • Collaborator
  • First Post
  • Conversation Starter
  • Week One Done

Recent Badges

2

Reputation

  1. The most important meat of the guide is the block that holds all the information and display that information onto the page. Here I will show how you create that block. Navigate in AdminCP > Page Management > Block Note: Your database name doesn't have to be called help guide but it does help we use the correct database that will show the block on. Details Name: Name of the block (can be called anything). Template Key: Name will be used to show on the page that will allows the block appear. Feed Configuration The main thing we really wanted to focus is number to show. This number also includes <h3> title as part of the count. Keeping it really high will ensure everything will show; if it doesn't show up, increased the number until the content is shown. Everything else in the feed configuration is community preference. Content Drop down: use as a base for a custom template {{$recordClass = null;}} {{$catClass = null;}} {{if count($records)}} {{$recordClass = get_class($records[0]);}} {{$catClass = '\IPS\cms\Categories' . $recordClass::database()->_id;}} {{endif}} {{$firstRecord = null;}} {{$currentUrlPath = \IPS\Request::i()->url()->data['path'];}} {{if count($records) and $catClass and count($catClass::roots())}} <ul class="ipsList_reset cGuides" data-controller="guides.main"> {{foreach $catClass::roots() as $root}} <li> <h2>{$root->_title}</h2> {{if count($root->children())}} <ul class="ipsList_reset"> {{foreach $root->children() as $child}} <li class="cGuides_closed"> <h3 data-action="expandSection"> {$child->_title} </h3> {{foreach $records as $record}} {{if $record->container()->_id == $child->_id}} <ul class="ipsList_reset"> {{if $firstRecord == null}} {{$firstRecord = $record;}} {{endif}} <li> <a {{if $currentUrlPath === $record->url()->data['path']}}class="cGuides_active"{{endif}} href="{$record->url()}"> {$record->_title} </a> {{if $record->isFutureDate() || $record->mapped('pinned') || $record->mapped('featured') || $record->hidden() === -1 || $record->hidden() === 1 || $record->hidden() === -2}} {{if $record->isFutureDate()}} <span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$record->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span></span> {{endif}} {{if $record->hidden() === -1}} <span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$record->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span></span> {{elseif $record->hidden() === -2}} <span><span class="ipsbadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$record->deletedBlurb()}'><i class='fa fa-trash'></i></span></span> {{elseif $record->hidden() === 1}} <span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span></span> {{endif}} {{if $record->mapped('pinned')}} <span><span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span></span> {{endif}} {{if $record->mapped('featured')}} <span><span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span></span> {{endif}} {{endif}} </li> </ul> {{endif}} {{endforeach}} </li> {{endforeach}} </ul> {{endif}} <ul class="ipsList_reset"> {{foreach $records as $record}} {{if $record->container()->_id == $root->_id}} {{if $firstRecord == null}} {{$firstRecord = $record;}} {{endif}} <li> <a {{if $currentUrlPath === $record->url()->data['path']}}class="cGuides_active"{{endif}} href="{$record->url()}"> {$record->_title} </a> {{if $record->isFutureDate() || $record->mapped('pinned') || $record->mapped('featured') || $record->hidden() === -1 || $record->hidden() === 1 || $record->hidden() === -2}} {{if $record->isFutureDate()}} <span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$record->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span></span> {{endif}} {{if $record->hidden() === -1}} <span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$record->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span></span> {{elseif $record->hidden() === -2}} <span><span class="ipsbadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$record->deletedBlurb()}'><i class='fa fa-trash'></i></span></span> {{elseif $record->hidden() === 1}} <span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span></span> {{endif}} {{if $record->mapped('pinned')}} <span><span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span></span> {{endif}} {{if $record->mapped('featured')}} <span><span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span></span> {{endif}} {{endif}} </li> {{endif}} {{endforeach}} </ul> </li> {{endforeach}} </ul> {{endif}} {{if $recordClass and \IPS\cms\Pages\Page::$currentPage and (string) \IPS\cms\Pages\Page::$currentPage->url() == (string) \IPS\Request::i()->url()}} {{if $firstRecord}} {{\IPS\Output::i()->redirect($firstRecord->url(), '', 302);}} {{else}} {{\IPS\Output::i()->redirect(\IPS\Http\Url::internal(''), '', 302);}} {{endif}} {{endif}}
  2. We'll need to create our Help Guide page with the manual HTML option. In the content portion, we'll want to insert our html code: <div class="ipsBox ipsPad"> <div class="ipsColumns ipsColumns_collapsePhone" id="elGuides_columns"> {{if \IPS\Request::i()->do !='edit' and \IPS\Request::i()->do !='form'}} <div class="ipsColumn ipsColumn_wide" id="HelpBar"> <div data-ipssticky data-ipssticky-relativeto="#HelpBar"> {block="help_guide_bar"} </div> </div> {{endif}} <div class="ipsColumn ipsColumn_fluid"> <div class="ipsPadding"> {database="help-guide"} </div> </div> </div> </div> Replace {database="help-guide"} with your database key. If you do not know what your database key is, if the database is already created it will show on the right side under database. If not, create a database and edit your page again and it will reappear again. Lastly, block name can be changed to whatever your want.
  3. Version 1.0.0

    0 downloads

    News Templates is a set of Pages templates. An almost 1:1 ratio but not entirely on the design of IPS news site but with some changes to feel differently. DEMO What's included: page_templates.xml (Listing, Display, Articles, and Form templates all-in-one) CSS stylesheet Installation Upload page_templates.xml to Pages > Page Management > Templates > upload templates (top right) > insert pages_templates provided inside News templates folder. While we're inside Pages > Page Management > Templates > new (bottom left) > create css file. Copy and Paste everything that was in css file from the News template folder. We want to edit our database settings Pages > Content > Database > Database name (whichever your database called > pencil (edit). Lets assign our templates Database Index: Show records like articles Article template: News Article Listing template group: News Article Listing Display Template group: News Article Display Add/Edit Form template: News Form Edit our actual page Pages > Page Management > Pages > whatever page your database assigned it > edit page in order for our CSS to appear on the page. Page Includes > assign your css file Save and view page. Now that we've added our page templates, head over to our help guide to see what we can customized. Note: When upgrading the page templates, using the import templates like you are installing them for the first time. Be sure to copy certain code like your site URLs and background URLs since they will always be different when upgrading then use the new version.
    $5
  4. Goza

    Welcome to IPSGoza

    Thank you for purchasing one of my database. I will try to document details about each database that has been released here so you can take full advantage on your site.
  5. You've just bought and installed News Database and wondering why there's no background images showing up if you're not using a cover image. Obvious, its trying to call a image when there's isn't one. There are few places you can upload an image on your website. Using the Page Management > media, you can upload an image and you can use the code there to display your placeholder image. Customization > Themes > Theme (dropdown) Manage resources > add image. Upload image through FTP on your server Lastly, copy image address you found on the internet. All the options will work but for simplicity, we'll stick with the first option as we're dealing with pages. Go to Pages > Page Management > media > Upload new media. Once you have added your image, you want to click on the image and on the left side will appear, you will want to copy media tag. The media tag will represent the url to the image itself. Now that we have our media tag, we want to head to Pages > Page Management > templates. There's 2 files we want to edit: News Article Display > record News Article Listing > recordRow News Article Display > record. If you see {media="4"} replace with your media number. If you're not using a media tag, just replace {media="4"} to whatever url is your placeholder image. <div class="cCmsRecordsArticleHeader" style="{{if $record->record_image}}background-image: url({file="$record->record_image" extension="cms_Records"}){{else}}background-image: url({media="4"}){{endif}}"> <div class="cCmsRecordsArticleHeader__height"></div> <nav class="cCmsRecordsArticleHeader__nav ipsLayout_container"> <ul> <li><a href="{pageurl="news"}"><i class="fa fa-angle-left"></i> Blog Home</a></li> <li><a href="{$record->container()->url()}">More in {$record->container()->_title}</a></li> </ul> </nav> </div> News Article Listing > recordRow. Same as before, replace media number with yours if your using media option but otherwise replace {media="4"} with your actual link to the placeholder image. <div class="cCmsCategoryFeaturedImage" style="{{if $row->record_image}}background-image: url({file="$row->record_image" extension="cms_Records"}){{else}}background-image: url({media="4"}){{endif}}"> {{if $row->record_image}} <img class="ipsImage" src="{file="$row->record_image" extension="cms_Records"}"> {{else}} <img class="ipsImage" src="{media="4"}"> {{endif}} </div> Edit our news css file. Replace media # or replace {media="4"} entirely to your URL of the image. .cCmsDatabasePageHeaderLogo { background-image: url({media="4"}); }
  6. To make your news template work for your community, we need to adjust some links that points to your community. There are some areas you would need to change: News Article Display > record News Article Listing > categoryHead News Article > Index Article Display Firstly, we'll start News Article Display > record. At the top, you will noticed this code: <li><a href="{pageurl="news"}"><i class="fa fa-angle-left"></i> Blog Home</a></li> If your news page is called news then you don't have anything to worry about. But if your page is called differently then you'll want to change news to your page. What {pageurl="news"} mean is your site address (example: www.yoursite.com/{pageurl="news"}). News is whatever page name is called. Article Listing Secondly, we'll start News Article Listing > categoryHead. At the top, you will noticed this code: <header class="cCmsDatabasePageHeader"> <div class="cCmsDatabasePageHeaderLogo"></div> <div class="ipsLayout_container"> <div class="ipsPadding"> <h1 class="ipsType_pageTitle">{$category->_title}</h1> <hr> <p class="ipsType_minorHeading">{$category->_description|raw}</p> </div> <nav class="cCmsDatabasePageHeader__nav"> <ul> <li {{if strpos( \IPS\Request::i()->path, '/news' ) !== FALSE}}class='cCmsDatabasePageHeader__navActive'{{endif}}> <a href="{pageurl="news"}">Recent</a> </li> <li {{if strpos( \IPS\Request::i()->path, 'news/ips' ) !== FALSE}}class='cCmsDatabasePageHeader__navActive'{{endif}}> <a href="{pageurl="news/ips"}">IPS</a> </li> <li {{if strpos( \IPS\Request::i()->path, 'news/other' ) !== FALSE}}class='cCmsDatabasePageHeader__navActive'{{endif}}> <a href="{pageurl="news/other"}">Other</a> </li> </ul> </nav> </div> </header> Again, as previously stated. If your site page is different than news, you can change it. If you have more categories in your news, you can add this code and adjust to your sites categories. <li {{if strpos( \IPS\Request::i()->path, 'news/other' ) !== FALSE}}class='cCmsDatabasePageHeader__navActive'{{endif}}> <a href="{pageurl="news/other"}">Other</a> </li> Article Index Thirdly, we'll start modifying News Article > Index. Again, at the top, you will notice this code. It very similar to the one above, but there's a slight different code. <header class="cCmsDatabasePageHeader"> <div class="cCmsDatabasePageHeaderLogo"></div> <div class="ipsLayout_container"> <div class="ipsPadding"> <h1 class="ipsType_pageTitle"><a href="{pageurl="news"}">{$database->_title}</a></h1> {{if $database->_description}} <hr> <p class="ipsType_minorHeading">{$database->_description}</p> {{endif}} </div> <nav class="cCmsDatabasePageHeader__nav"> <ul> <li {{if strpos( \IPS\Request::i()->path, 'news' ) !== FALSE}}class='cCmsDatabasePageHeader__navActive'{{endif}}> <a href="{pageurl="news"}">Recent</a> </li> <li {{if strpos( \IPS\Request::i()->path, 'news/ips' ) !== FALSE}}class='cCmsDatabasePageHeader__navActive'{{endif}}> <a href="{pageurl="news/ips"}">IPS</a> </li> <li {{if strpos( \IPS\Request::i()->path, 'news/other' ) !== FALSE}}class='cCmsDatabasePageHeader__navActive'{{endif}}> <a href="{pageurl="news/other"}">Other</a> </li> </ul> </nav> </div> </header> If your page url is differently, then we'll need to change it. Note In News Article Listing > categoryHead and News Article > Index, these code seems the same but they act differently. The first line of code, if you're not on news page then don't active and the second line of code, if your on news page use active code. This is somewhat of a workaround I have found it be activate when your on news page or not. <li {{if strpos( \IPS\Request::i()->path, '/news' ) !== FALSE}}class='cCmsDatabasePageHeader__navActive'{{endif}}> <li {{if strpos( \IPS\Request::i()->path, 'news' ) !== FALSE}}class='cCmsDatabasePageHeader__navActive'{{endif}}>
  7. I have tremendously been thinking about how to make a little extra cash on top of my current job. While prices of everything going up while our checks staying the same or slightly higher depending on the week. It sucks. The holidays are around the corner, I could use some extra cash for it and whatever it might be in the future. One of the things I like to make are Pages Templates. Another hurdle I have is how much to charge for my worth. A lot of templates you see here that you can find them in IPS official forums or another dev site with little to no charge. But many of them are out-of-date and would need little fiddling to make them latest version. My thought process is if I charge little as $5; you 100% guarantee that whatever database template you buy from me, will stay updated over the course of IPS lifespan. What I have made so far: Providers, Release Notes, Help Guide, Deprecation Tracker (None of them have been released yet). I've also gotten Podcast, knowledge base, and FAQ in development that will be releasing in the future. If there's anything you would like to see that might be possible in Pages, let me know and I will explore the idea of it. Other than page templates, themes was another option I have been exploring as well. But I could talk about that another post.
×
×
  • Create New...