• [MOD] Simple News Publishing 5 0 5 1
Currently:  

Author Topic: [MOD] Simple News Publishing  (Read 119832 times)

0 Members and 1 Guest are viewing this topic.

Offline barkuras

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [MOD] Simple News Publishing
« Reply #75 on: December 22, 2008, 05:54:32 PM »
 :flag-de: Wie kann man Nachrichten nur für eingeloggte User darstellen lassen? Also wenn jemand nicht eingeloggt ist, dann soll er die Nachrichten auch nicht sehen können. Kann mir da bitte jemand helfen?

 :flag-en: Is it possible to show news only to users that are logged in?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Simple News Publishing
« Reply #76 on: December 22, 2008, 07:20:13 PM »
Hallo barkuras und willkommen im 4images Forum ...

... nun, das ist wie folgt möglich ...
... in deinem Template (z.B. home.html) verwende folgendes ...
Code: [Select]

{if user_loggedin} ... hier der Code, der nur eingeloggten Usern gezeigt werden soll ...  {endif user_loggedin}

Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline barkuras

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [MOD] Simple News Publishing
« Reply #77 on: December 22, 2008, 07:37:04 PM »
Vielen Dank für die schnelle Antwort!

Offline sanko86

  • Sr. Member
  • ****
  • Posts: 310
    • View Profile
    • Elemegim
Re: [MOD] Simple News Publishing
« Reply #78 on: January 21, 2009, 02:41:34 PM »
Thanks

beavtiful mod

Web site:http://www.anlatiyoruz.com
Hayat zorluklarla doludur.Ama en zoru insanýn insana düþmanlýðýdýr.

Offline qBass17

  • Addicted member
  • ******
  • Posts: 1.800
  • I ♥ 4I
    • View Profile
Re: [MOD] Simple News Publishing
« Reply #79 on: January 20, 2010, 09:29:38 PM »
Die Modifikation ist wirklich gut.
Funktioniert auch unter 1.7.7

Was mir aber pers. fehlt ist, dass die User keine Kommentare schreiben können.
Das wäre wirklich was feines!

Und die Letzten News werden auch nicht in der news.php angezeigt!

Offline qBass17

  • Addicted member
  • ******
  • Posts: 1.800
  • I ♥ 4I
    • View Profile
Re: [MOD] Simple News Publishing
« Reply #80 on: May 20, 2010, 12:53:54 PM »
Ich bekomme komischerweise diese Fehler:
Quote
DB Error: Bad SQL Query: SELECT news_title, news_text, user_name, news_date FROM 4images_news ORDER BY news_date DESC LIMIT 0,
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Was bedeutet das?

Offline qBass17

  • Addicted member
  • ******
  • Posts: 1.800
  • I ♥ 4I
    • View Profile
Re: [MOD] Simple News Publishing
« Reply #81 on: May 21, 2010, 02:58:02 PM »
Was kann ich da tun?
Quote
DB Error: Bad SQL Query: SELECT news_title, news_text, user_name, news_date FROM 4images_news ORDER BY news_date DESC LIMIT 0,
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /is/htdocs/wp1189343_OX40HRKULQ/www/gau-pc/portal/includes/db_mysql.php on line 116

Kann mir jemand helfen? Das ist erst passiert, als ich folgendes machen sollte

#
#-----[ OPEN ]---------------------------------
#
index.php

#
#-----[ FIND ]---------------------------------
#
unset($categories);

#
#-----[ AFTER, ADD ]------------------------------------------
#

//-----------------------------------------------------
// ----- Show news ------------------------------------
//-----------------------------------------------------

if (!isset($config['news_home_display']) || $config['news_home_display'] == 1)
	
$sql "SELECT news_title, news_text, user_name, news_date FROM ".NEWS_TABLE." ORDER BY news_date DESC LIMIT 0, ".((isset($config['news_nb']))?$config['news_nb']:5);
else if (
$config['news_home_display'] == 2)
	
$sql "SELECT news_title, news_text, user_name, news_date FROM ".NEWS_TABLE." WHERE news_date > ".(time() - ((isset($config['news_nb_days']))?$config['news_nb_days']:15)*86400)." ORDER BY news_date DESC";

$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);

if (!
$num_rows)  {
  
$news "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  
$news .= $lang['no_news'];
  
$news .= "</td></tr></table>";
}
else  {
  
$news "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";

  while (
$image_row $site_db->fetch_array($result))
  {
    
$news .= "<tr class=\"imagerow1\">\n";
    
$news .= "<td width=\"100%\" valign=\"top\">\n";
    
$new_is_new = ($image_row['news_date'] > time() - ((isset($config['news_cutoff']))?$config['news_cutoff']:3)*86400);
	
	
$news .= "<b>".$image_row['news_title']."</b>".(($new_is_new)?" <sup class=\"new\">".$lang['new']."</sup>":"").sprintf($lang['news_posted_by'], $image_row['user_name'], format_date($config['date_format']." ".$config['time_format'], $image_row['news_date']));
    
$news .= "\n</td>\n";
    
$news .= "</tr>\n";

    
$news .= "<tr class=\"imagerow2\">\n";
    
$news .= "<td width=\"100%\" valign=\"top\">\n<br/>";
	
	
$news .= format_text($image_row['news_text'], ((isset($config['news_html']))?$config['news_html']:0), 0, ((isset($config['news_bbcode']))?$config['news_bbcode']:1), ((isset($config['news_bbcodeimg']))?$config['news_bbcodeimg']:1));
	
	
$news .= "<br/><br/>\n</td>\n";
    
$news .= "</tr>\n";

  } 
// end while

  
$news .= "</table>\n";
// end else

$site_template->register_vars(array(
	
"news" => $news,
	
"news_archives" => $lang['news_archive'],
	
"news_main" => $lang['news_main']
));
unset(
$news);

Offline qBass17

  • Addicted member
  • ******
  • Posts: 1.800
  • I ♥ 4I
    • View Profile
Re: [MOD] Simple News Publishing
« Reply #82 on: May 25, 2010, 11:20:41 AM »
Da da niemand eine Idee?

Offline qBass17

  • Addicted member
  • ******
  • Posts: 1.800
  • I ♥ 4I
    • View Profile
Re: [MOD] Simple News Publishing
« Reply #83 on: June 24, 2010, 10:40:41 AM »
Ein Kommentarsystem dafür kann niemand erstellen oder? Das fehlt dem Mod noch!

Ps.: Wenn das [http://www.4homepages.de/forum/index.php?topic=9064.285] die gleiche Mod ist, warum werden die Thread nicht zusammegelegt?