Jump to content

Download: IP.Content 1.1.1 Database Feed


ruinernix

Recommended Posts

File Name: IP.Content 1.1.1 Database Feed
File Submitter: wixerle
File Submitted: 10 Nov 2009
File Category: CCS Modifications

This is the very first 'alpha' version of this tool. It is currently working and lightly tested. Unfortunately I don't have a demo site since my site is not live yet and still in development.

This has only been tested with IP.Content 1.1.1. Current version of file: 1.

The following features are implemented. More features to come if more features are requested, but that is all I needed at the moment:

[*]Select database[*]Sort by comments, rating, submission date, updated date or any field of your database, ascending or descending.[*]Limit number of records and skip number of records[*]Attachment parsing[*]BB-code parsing
The fields are specified just like in the database templates.

This is an example block code:


replace the /page/"database" with your actual database name for this feed.

Installation:

Step 1: Drop in admin/application_addons/ips/ccs/sources/blocks/feed/data_sources

Step 2: Nothing. Thanks to IPB's plugin systems, it is that easy to install!

88x31.png

Click here to download this file


<div class='general_box'>

	<h3>{$title}</h3>

	<ul class='hfeed'>    	

	<if test="is_array( $records ) && count( $records )">

		{parse striping="feed_striping" classes="row1,row2 altrow"}

		<foreach loop="$records as $r">

			<li class='hentry {parse striping="feed_striping"}'>

            <a href='{parse block="board_url"}/index.php/?/page/database?record={$r['primary_id_field']}' rel='bookmark' title='{$r['field_1_value']}'>{$r['field_1_value']}</a>			

			<span class='date'><abbr class="published" title="{parse expression="date( 'c', $r['date'] )"}">{parse date="$r['field_2']" format="short"}</abbr></span>

			<span class='desctext'>{IPSText::truncate( strip_tags($r['field_3_value']), 100 )}</span>

		</li>

		</foreach>

	</if>

</ul>

</div>

Link to comment

[quote name='^AuRoN^' date='19 November 2009 - 04:26 PM' timestamp='1258666004' post='1880784']
Then I follow all the steps to create the block and the only thing I get is the title, do not I get the contents of the category of the chosen database, knows what is the problem


You will need to change the fields (ex: field_3_value) to the ones matching your database. If you need help figuring out the tabs, create a new page database listing and click the template tag help links from there, it will tell you what each field is named.

Link to comment

[quote name='ruinernix' date='19 November 2009 - 10:57 PM' timestamp='1258667835' post='1880793']
You will need to change the fields (ex: field_3_value) to the ones matching your database. If you need help figuring out the tabs, create a new page database listing and click the template tag help links from there, it will tell you what each field is named.


Sorry but I do not understand what I mean

Thanks

Link to comment

Step by step:

You will now have a list of all the fields, with their field name (ex: field_16_value). You will have to replace my example block field_xx_value with the ones from your database. I can't make it any clearer than this so I hope you can follow these instructions and figure it out from there =)

  1. Click "My Apps" and select "IP.Content"
  2. Click "Templates" on the left side
  3. Click "Add Template"
  4. Select "Add Listing Template"
  5. Click "Database Tag Help" link above the block content
  6. Click the database you want
  7. Click "Listing Template"


Link to comment
  • 2 months later...

Just wondering about the status of the request for random sort order. Can this be done? I'm trying to create a "Random Quote" block on my site using IP.Content, and this block works to put a quote on the page which is very cool, but I'd really like it to randomly sort. Please? :)

AJ

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...