Sign in to follow this  
Followers 0

IP Content Update Suggestion - Archives

6 posts in this topic

Posted

I posted about this in the IP Content Support forum here: http://community.invisionpower.com/topic/364332-where-do-archived-articles-go/

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

post-193990-0-21966800-1339899631.png

Share this post


Link to post
Share on other sites

Posted

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.

Share this post


Link to post
Share on other sites

Posted

[quote name='bfarber' timestamp='1340031906' post='2278718']
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?

index.php?app=core&module=attach&section

Share this post


Link to post
Share on other sites

Posted

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

Share this post


Link to post
Share on other sites

Posted

This is the block template, where would I add that in? (sorry, have no idea about 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>

<php>













































Share this post


Link to post
Share on other sites

Posted

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



That might work. I didn't check.


<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>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Who's Browsing   0 members

    No registered users viewing this page.