Jump to content


Photo

IP Content Update Suggestion - Archives


  • Please log in to reply
5 replies to this topic

#1 Maalong

Maalong

    Advanced Member

  • +Clients
  • 235 posts

Posted 16 June 2012 - 09:20 PM

I posted about this in the IP Content Support forum here: http://community.inv...ed-articles-go/

Would it be possible to include a better link to archives in the next update than this icon:

Attached File  Archives.png   6.24KB   0 downloads
Posted ImagePosted Image

#2 bfarber

bfarber

    RBT-KS

  • IPS Management
  • 27,212 posts

Posted 18 June 2012 - 10:05 AM

Of course we could change it, but note that the templates in the ACP are fully editable as it is - you can go in and change it to text, or move the link, or use a different icon, just by editing the article templates in IP.Content.
Brandon Farber
Developer / Senior Support

If it sounds like fun, it's not allowed on the bus!

Posted Image     Posted Image

Invision Power Services, Inc.

#3 Maalong

Maalong

    Advanced Member

  • +Clients
  • 235 posts

Posted 19 June 2012 - 10:53 AM

Of course we could change it, but note that the templates in the ACP are fully editable as it is - you can go in and change it to text, or move the link, or use a different icon, just by editing the article templates in IP.Content.


Could you show me how to change it so that by clicking into the links below would be changed they would go to the relevant archives?

Posted Image
Posted ImagePosted Image

#4 Rimi

Rimi

    Strip Me

  • +Clients
  • 5,774 posts

Posted 19 June 2012 - 10:59 AM

You just append ?view=archive onto the link in the block template.

#5 Maalong

Maalong

    Advanced Member

  • +Clients
  • 235 posts

Posted 19 June 2012 - 06:28 PM

This is the block template, where would I add that in? (sorry, have no idea about PHP):

<php>
// Modify the array so that categories are hierarchical
$this->_categories = array();

foreach( $records as $r ){
$this->_categories[ $r['category']['category_parent_id'] ][ $r['category']['category_id'] ] = $r['category'];
}

$this->_database_url = ( $records[0] ) ? $this->registry->ccsFunctions->returnDatabaseUrl( $records[0]['category']['category_database_id'] ) : false;
//print_r( $this->_database_url );
</php>

<div id='category_list' class='general_box clearfix'>
<h3>{$this->lang->words['ab__categories']} <a href='{$this->_database_url}?view=categories'>{$this->lang->words['ab__seealllink']}</a></h3>
<ul>
<if test="is_array( $this->_categories ) && count( $this->_categories )">
<foreach loop="$this->_categories[0] as $r">
<li>
<a href='{$this->registry->ccsFunctions->returnDatabaseUrl( $r['category_database_id'], $r['category_id'] )}'>{$r['category_name']} (<b>{$r['category_records']}</b>)</a>
<if test="count( $this->_categories[ $r['category_id'] ] )">
<ul>
<foreach loop="$this->_categories[ $r['category_id'] ] as $sub">
<li>
<a href='{$this->registry->ccsFunctions->returnDatabaseUrl( $sub['category_database_id'], $sub['category_id'] )}'>{$sub['category_name']} (<b>{$sub['category_records']}</b>)</a>
</li>
</foreach>
</ul>
</if>
</li>
</foreach>
</if>
</ul>
</div>
<br />
<if test="$this->_database_url">
<div class='general_box clearfix' id='article_search'>
<h3>{$this->lang->words['ab__searcharticles']}</h3>
<form method='post' action='{$this->_database_url}' class='ipsPad'>
<input type='hidden' name='do' value='search' />
<input type='text' name='search_value' class='input_text' />
<input type='submit' value='{$this->lang->words['ab__searchbutton']}' class='input_submit' />
</form>
</div>
<br />
</if>


Posted ImagePosted Image

#6 Rimi

Rimi

    Strip Me

  • +Clients
  • 5,774 posts

Posted 19 June 2012 - 06:54 PM

You don't need to know PHP. You need to know HTML.

<php>
// Modify the array so that categories are hierarchical
$this->_categories = array();
foreach( $records as $r ){
$this->_categories[ $r['category']['category_parent_id'] ][ $r['category']['category_id'] ] = $r['category'];
}
$this->_database_url = ( $records[0] ) ? $this->registry->ccsFunctions->returnDatabaseUrl( $records[0]['category']['category_database_id'] ) : false;
//print_r( $this->_database_url );
</php>
<div id='category_list' class='general_box clearfix'>
<h3>{$this->lang->words['ab__categories']} <a href='{$this->_database_url}?view=categories'>{$this->lang->words['ab__seealllink']}</a></h3>
<ul>
<if test="is_array( $this->_categories ) && count( $this->_categories )">
<foreach loop="$this->_categories[0] as $r">
<li>
<a href='{$this->registry->ccsFunctions->returnDatabaseUrl( $r['category_database_id'], $r['category_id'] )}?view=archive'>{$r['category_name']}  (<b>{$r['category_records']}</b>)</a>
<if test="count( $this->_categories[ $r['category_id'] ] )">
<ul>
<foreach loop="$this->_categories[ $r['category_id'] ] as $sub">
<li>
<a href='{$this->registry->ccsFunctions->returnDatabaseUrl( $sub['category_database_id'], $sub['category_id'] )}?view=archive'>{$sub['category_name']} (<b>{$sub['category_records']}</b>)</a>
</li>
</foreach>
</ul>
</if>
</li>
</foreach>
</if>
</ul>
</div>
<br />
<if test="$this->_database_url">
<div class='general_box clearfix' id='article_search'>
<h3>{$this->lang->words['ab__searcharticles']}</h3>
<form method='post' action='{$this->_database_url}' class='ipsPad'>
<input type='hidden' name='do' value='search' />
<input type='text' name='search_value' class='input_text' />
<input type='submit' value='{$this->lang->words['ab__searchbutton']}' class='input_submit' />
</form>
</div>
<br />
</if>

That might work. I didn't check.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users