Забыли пароль?
Запросите новый здесь.

Автор темы: jan1991to
ID темы: 2031
Информация:
Тема содержит 3 сообщения, была просмотрена 4802 раз.
Просмотр темы
PHP-Fusion Russia » For English-speaking users » Questions and answers
 Распечатать тему
Question about articles
jan1991to
Zdrastvujcie!

I'm new user and can't speak russia, but all people says that You are the best hackers on the world so You probobly know everything about www php fusion etc... :))

I have some question about articles.

1. Is it possible to add article photo, like in add news photo ?
2. Is it possible to make the panel with the most popular articles (2 or 3 articles). I was working on some code and have something like that:

Скачать исходники  Код


openside('Popularne Artykuły');
// Legnépszerűbbek
echo "<td class='lc' width='33%' >";
$qresult=dbquery("SELECT * FROM ".DB_ARTICLES." ORDER BY article_reads DESC LIMIT 2");
if(dbrows($qresult)!=0){
echo "<table width='260' cellpadding='0' cellspacing='0'>";
while($data=dbarray($qresult)){
echo "<tr>\n<td class='small' align='left'><a target='_self' href='".BASEDIR."readarticle.php?article_id=".$data['article_id']."' title='".$data['article_subject']."'>";
echo trimlink($data['article_subject'], 30)."</a></td>\n<td class='small' align='right'>[".$data['article_reads']."]</td></tr>\n";
}
echo "</table>";
}
echo "</td>\n";



closeside();







But i want this to have in this form:

The most popular article / Second most popular article (Depends of vievs)
bla bla bla / bla bla bla
bla bla bla / bla bla bla (20-30 characters)
see more... / see more... (link to the rest of the article)


3. same like in 2 but first 2-3 new article on the site:

New article / Oldest article
bla bla bla / bla bla bla
bla bla bla / bla bla bla (20-30 characters)
see more... / see more... (link to the rest of the article)


i have something like this but still its not this what i want:

Скачать исходники  Код


openside('Popularne Artyku&#322;y');
$result = dbquery(
   "SELECT ta.article_id, ta.article_subject, tac.article_cat_id, tac.article_cat_access, ta.article_snippet, ta.article_reads FROM ".DB_ARTICLES." ta
   INNER JOIN ".DB_ARTICLE_CATS." tac ON ta.article_cat=tac.article_cat_id
   ".(iSUPERADMIN ? "" : "WHERE ".groupaccess('article_cat_access'))." AND article_draft='0' ORDER BY article_datestamp DESC LIMIT 0,3"
);
if (dbrows($result)) {
   while($data = dbarray($result)) {
      $itemsubject = trimlink($data['article_subject'], 40);
      echo "<h5><a href='".BASEDIR."articles.php?article_id=".$data['article_id']."' title='".$data['article_subject']."' class='side'>$itemsubject</a> [".$data['article_reads']."]</h5>\n";
      echo "<p>".$data['article_snippet']."</p>\n";
   }
} else {
   echo "<div style='text-align:center'>".$locale['global_031']."</div>\n";
}
closeside();
?>







I think that's all for now. Thx for help!
 
jikaka
1. yes, you need to edit the files of articles, as the admin panel and the main
2. and 3. yes, look
http://rusfusion...._value=ASC
http://rusfusion...._value=ASC
http://rusfusion...._value=ASC
you can recycle themselves ready panel under
 
Web
jan1991to
1. yes, you need to edit the files of articles, as the admin panel and the main


some 1 from forum alredy do something like this ? i'm green and dunno know how to do this.
 

Поделиться этой темой
Социальные закладки: Vkontakte Odnoklassniki Mail.ru Facebook Google Tweet This
URL:
BBcode:
HTML:

Перейти на форум:
Похожие темы
Темы Форум Ответов / Просмотров Последние сообщения
Мод BB Codes for Articles & News  →  Моды 34 / 33293 23.09.2019 17:41
Seo URL for news and articles  →  Другое 3 / 1874 06.10.2018 17:11
Modified Articles (ошибки)  →  Моды 1 / 3040 31.01.2016 19:36
AdGallery question  →  Plugins and mods 2 / 3600 31.01.2014 15:16
Registration Secure Question  →  Плагины 9 / 7534 12.11.2013 10:02
Modified Articles ошибка  →  Ошибки, баги 5 / 3047 21.09.2012 17:11
Sub-Articles  →  Моды 2 / 1148 14.08.2011 20:08
Топ 5 пользователей форума
Zaxap Zaxap (1,090)   Vova Vova (877)   Pisatel Pisatel (678)   util util (666)   SchreiBear SchreiBear (625)