Intechnic
Users Developers
Home / Forums / International Users / German Users / Kategorie als NEW wenn neuer Link / Topic Posts

In-Portal Forum

This is a place for users of In-Portal to ask questions, discuss various topics, and interact with other members of the In-Portal Community. Please report bugs through the Bugs Team (not the Forum). If you are interested in contributing or joining one of the many Teams for In-Portal, please check out the Contribute section of the website.
 

In-Portal Forum

Kategorie als NEW wenn neuer Link (6)


Posted: 07/13/2003 10:14:00 AM

Reply Quoted  


Wie muss ich die list_cats.tpl verändern, damit das NEW bei den entsprechenden Kategorien erscheint, wenn neue Links vorhanden sind?

Posted: 07/14/2003 6:16:00 PM

Reply Quoted  


Sorry for the reply in English, but unfortunately I am not really good in German :smile:.

My question is, when do you want to consider what category has the new links? New links could be in the sub-cats of parent category as well, or we are talking only about the links which are located in the current one?

Thank you.

Dmitry

Posted: 07/21/2003 12:43:00 PM

Reply Quoted  


If new link in a sub-category is present, this sub-category and all categories are to be marked over it.

Example:
[img:662a0294cd]http://links.3dmaxforum.net/Kategorie.jpg[/img:662a0294cd]

Gruß Andreas

<font size=-1>[ This Message was edited by: abaum on 2003-07-21 12:53 ]</font>

Posted: 07/24/2003 7:08:00 PM

Reply Quoted  


Hi,

Please use this module:


function runmod_newlinks_in_cat()
{ global 
$conn$cat_data$cat_ids$link_new;
  
    
$link_query = &quot;SELECT inl_links.link_idlink_namelink_picklink_desclink_datelink_hitslink_ratinglink_voteslink_numrevslink_imagelink_userlink_urlcat_idlink_visuser_nameemail FROM inl_lc LEFT JOIN inl_links ON inl_lc.link_id=inl_links.link_id LEFT JOIN inl_users ON inl_links.link_user=inl_users.user_id &quot;;
    
$l_time mktime(0,0,0,date(&quot;m&quot,date(&quot;d&quot-$link_new,date(&quot;Y&quot);
    
$where = &quot;WHERE link_date&gt;=$l_time AND link_vis=AND inl_lc.link_pend=0&quot;;
    
cat_subs($cat_data[6]);
    if 
$cat_ids)
    {
        
$cat_ids ereg_replace(&quot;, $&quot;, &quot;&quot;, $cat_ids);
        
$where.= &quot; AND inl_lc.cat_id IN ($cat_ids)&quot;;
    }
    
    
$cat_ids=&quot;&quot;;
    echo 
$link_query.$where.&quot;&lt;BR&gt;&quot;;
    
$rs = &amp;$conn-&gt;Execute($link_query.$where);

    if 
$rs-&gt;RecordCount()&gt;0)
        
$ret = &quot;New Links&quot;;
    else
        
$ret = &quot;&quot;;

  return 
$ret;
}




Good Luck

Dmitry.

Posted: 07/26/2003 4:47:00 AM

Reply Quoted  


Thank You! Into which file am I to insert the code?

Gruß Andreas

Posted: 07/27/2003 11:42:00 PM

Reply Quoted  


Hi,

Please refer to the following post http://support.intechnic.com/forum/viewtopic.php?topic=2628&forum=4

Sincerely,

Dmitry