Jump to content

werushka

Members
  • Posts

    94
  • Joined

  • Last visited

Everything posted by werushka

  1. Sorry for the bothering title. My test.php shows this. HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7, where can i change these values on my vps server. Thanks for your replies. ???
  2. i have found out something new, in xml file created the characters show correctly but only if i subscribe to feeds it does not show correctly on browser window.
  3. Ok thanks I added a css style and now it is fixed
  4. Hi everyone I have a problem with an html table... In Firefox the site shows correctly but in IE7 this table messes up the page that it is in. the code is if i remove <table></table> no more problem but of course nothing is orders. I would really appreciate any help. Thanks very much in advance.
  5. <?php // The source code packaged with this file is Free Software, Copyright (C) 2005 by // Ricardo Galli <gallir at uib dot es>. // It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise. // You can get copies of the licenses here: // http://www.affero.org/oagpl.html // AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING". include_once('Smarty.class.php'); $main_smarty = new Smarty; include('config.php'); include(mnminclude.'link.php'); include(mnminclude.'html1.php'); include(mnminclude.'search.php'); include_once(mnminclude.'smartyvariables.php'); if(!empty($_REQUEST['rows'])) $rows = $_REQUEST['rows']; else $rows = 40; if(!empty($_REQUEST['time'])) { // Prepare for times if(!($time = check_integer('time'))) die; $sql = "SELECT link_id, count(*) as votes FROM " . table_votes . ", " . table_links . " WHERE "; if ($time > 0) { $from = time()-$time; $sql .= "vote_date > FROM_UNIXTIME($from) AND "; } $sql .= "vote_link_id=link_id AND link_status != 'discard' GROUP BY vote_link_id ORDER BY votes DESC LIMIT $rows"; $last_modified = time(); $title = $main_smarty->get_config_vars('PLIGG_Visual_RSS_Recent') . ' ' . txt_time_diff($from); $link_date = ""; } else { // All the others $tmpsearch = new Search; if(isset($_REQUEST['search'])){ $tmpsearch->searchTerm = sanitize($_REQUEST['search'], 3); } else { $tmpsearch->searchTerm = ''; } $search = $tmpsearch->get_search_clause(); // The link_status to search if(!empty($_REQUEST['status'])) { $status = $_REQUEST['status']; } else { // By default it searches on all if($search) $status = 'published'; else $status = 'published'; } switch ($status) { case 'published': $order_field = 'link_published_date'; $link_date = 'published_date'; $title = " / " . $main_smarty->get_config_vars("PLIGG_Visual_Published_News"); break; case 'queued': $title = " / " . $main_smarty->get_config_vars("PLIGG_Visual_Pligg_Queued"); $order_field = 'link_date'; $link_date = "date"; break; case 'all': $title = ""; $order_field = 'link_date'; $link_date = "date"; break; default: $main_smarty->assign('tpl_center', '404error'); $main_smarty->display($the_template . '/pligg.tpl'); die(); break; } if($status == 'all') { $from_where = "FROM " . table_links . " WHERE link_status!='discard' "; } else { $from_where = "FROM " . table_links . " WHERE link_status='$status' "; } if(($cat=check_integer('category'))) { $from_where .= " AND link_category=$cat "; $category_name = $db->get_var("SELECT category_name FROM " . table_categories . " WHERE category_id = $cat AND category_lang='$dblang'"); $title .= " / " . htmlspecialchars($category_name); } // This doesn't seem to work -kb if($search) { $from_where .= $search; $title = htmlspecialchars($_REQUEST['search']); } $order_by = " ORDER BY $order_field DESC "; $last_modified = $db->get_var("SELECT UNIX_TIMESTAMP(max($order_field)) links $from_where"); $sql = "SELECT link_id $from_where $order_by LIMIT $rows"; } do_rss_header($title); $link = new Link; $links = $db->get_col($sql); if ($links) { foreach($links as $link_id) { $link->id=$link_id; $link->read(); $category_name = $db->get_var("SELECT category_name FROM " . table_categories . " WHERE category_id = $link->category AND category_lang='$dblang'"); $link->link_summary = str_replace("\n", "<br />", $link->link_summary); $link->link_summary = str_replace("’", "'", $link->link_summary); $link->link_summary = str_replace("–", "-", $link->link_summary); $link->link_summary = str_replace("—", "-", $link->link_summary); $link->link_summary = str_replace("“", "\"", $link->link_summary); $link->link_summary = str_replace("”", "\"", $link->link_summary); $description = $link->link_summary; $description = strip_tags($description); $description = htmlspecialchars($description); $title = $link->title; $title = strip_tags($title); $title = htmlspecialchars($title); $link->title = str_replace("á", "a", $link->title); $link->title = str_replace("é", "e", $link->title); $link->title = str_replace("í", "i", $link->title); $link->title = str_replace("ó", "o", $link->title); $link->title = str_replace("ú", "u", $link->title); $link->title = str_replace("ñ", "n", $link->title); $link->title = str_replace("Á", "A", $link->title); $link->title = str_replace("É", "E", $link->title); $link->title = str_replace("Í", "I", $link->title); $link->title = str_replace("Ó", "O", $link->title); $link->title = str_replace("Ú", "U", $link->title); $link->title = str_replace("¿", "", $link->title); $link->title = str_replace("Ñ", "N", $link->title); echo "<item>\n"; echo "<title><![CDATA[". onlyreadables(remove_error_creating_chars($title)) . "]]></title>\n"; echo "<link>".getmyFullurl("storyURL", $link->category_safe_name($link->category), urlencode($link->title_url), $link->id)."</link>\n"; echo "<comments>".getmyFullurl("storyURL", $link->category_safe_name($link->category), urlencode($link->title_url), $link->id)."</comments>\n"; if (!empty($link_date)) echo "<pubDate>".date('D, d M Y H:i:s T', $link->$link_date)."</pubDate>\n"; else echo "<pubDate>".date('D, d M Y H:i:s T', time())."</pubDate>\n"; echo "<dc:creator>" . $link->username($link->author) . "</dc:creator>\n"; echo "<category>" . htmlspecialchars($category_name) . "</category>\n"; echo "<guid>".getmyFullurl("storyURL", $link->category_safe_name($link->category), urlencode($link->title_url), $link->id)."</guid>\n"; echo "<description><![CDATA[" . $description . "<br/><br/>".$link->votes." ".$main_smarty->get_config_vars('PLIGG_Visual_RSS_Votes')." ]]></description>\n"; echo "</item>\n\n"; } } do_rss_footer(); function do_rss_header($title) { global $last_modified, $dblang, $main_smarty; header('Content-type: text/xml; charset=utf-8', true); echo '<?phpxml version="1.0" encoding="utf-8"?'.'>' . "\n"; echo '<rss version="2.0" '."\n"; echo 'xmlns:content="http://purl.org/rss/1.0/modules/content/"'."\n"; echo 'xmlns:wfw="http://wellformedweb.org/CommentAPI/"'."\n"; echo 'xmlns:dc="http://purl.org/dc/elements/1.1/"'."\n"; echo '>'. "\n"; echo '<channel>'."\n"; echo '<title>'.htmlspecialchars($main_smarty->get_config_vars("PLIGG_Visual_Name")).$title.'</title>'."\n"; echo '<link>'.my_base_url.my_pligg_base.'</link>'."\n"; echo '<description>'.$main_smarty->get_config_vars("PLIGG_Visual_RSS_Description").' '.$link->votes.' votes</description>'."\n"; echo '<pubDate>'.date('D, d M Y H:i:s T', $last_modified).'</pubDate>'."\n"; echo '<language>'.$dblang.'</language>'."\n"; } function do_rss_footer() { echo "</channel>\n</rss>\n"; } function onlyreadables($string) { for ($i=0;$i<strlen($string);$i++) { $chr = $string{$i}; $ord = ord($chr); if ($ord<32 or $ord>126) { $chr = "~"; $string{$i} = $chr; } } return str_replace("~", "", $string); } ?>
  6. Can anyone please help me I need to know how to save this file.
  7. OK i saved as UTF-8 and I am seeing the feed as just text and on top of the page i see this .
  8. Ok this is what I done I have removed all the special charaters from rss.php and than I have copied all selected text into texpad than pasted it than copied again and pasted in the rss.php on the server from plesk file management utility. But it does not work...there is a trick on doing it but I don't know how.
  9. Thanks for you reply. Actually in rss.php there are no special characters. In my web site there are special characters like headline have special characters and sows allright on the web site. But unfortunitally if the use wants to click on RSS icon to keep an eye of the headlines s/he can do it but in tht case the special characters are noe shown correctly. Hope I a clearer.
  10. In my web site i have rss.php it is working fine but the special characters does not show right some characters I can not see and some characters I see as ?. I checkt the DB and it seems that everything is fine there... What am I doing wrong? Really appreciate any feed back.
  11. Hey everyone, I need a simple CMS system or blog, that can do the following. Each week I want to post an argument for my students. The argument will only be posted by me, I want my students to comment on my argument. I also want my students be able to rate the comments. Also if it is possible a sidebar which shows top rated commenter. Also search function. The site should be secure and search engine friendly. My students should log in before they comment. I need a secure cms system because i have some geeks in my class and you can imagine... Really appreciate you feedback.
  12. I am using a CMS system and in that there is rss.php file as below and in rss (firefox) the story headers ara not displayed correctly my browser just gets rid of special characters. I would really really really appreciate any help. here is the code <?php // The source code packaged with this file is Free Software, Copyright (C) 2005 by // Ricardo Galli <gallir at uib dot es>. // It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise. // You can get copies of the licenses here: // http://www.affero.org/oagpl.html // AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING". include_once('Smarty.class.php'); $main_smarty = new Smarty; include('config.php'); include(mnminclude.'link.php'); include(mnminclude.'html1.php'); include(mnminclude.'search.php'); include_once(mnminclude.'smartyvariables.php'); if(!empty($_REQUEST['rows'])) $rows = $_REQUEST['rows']; else $rows = 40; if(!empty($_REQUEST['time'])) { // Prepare for times if(!($time = check_integer('time'))) die; $sql = "SELECT link_id, count(*) as votes FROM " . table_votes . ", " . table_links . " WHERE "; if ($time > 0) { $from = time()-$time; $sql .= "vote_date > FROM_UNIXTIME($from) AND "; } $sql .= "vote_link_id=link_id AND link_status != 'discard' GROUP BY vote_link_id ORDER BY votes DESC LIMIT $rows"; $last_modified = time(); $title = $main_smarty->get_config_vars('PLIGG_Visual_RSS_Recent') . ' ' . txt_time_diff($from); $link_date = ""; } else { // All the others $tmpsearch = new Search; if(isset($_REQUEST['search'])){ $tmpsearch->searchTerm = sanitize($_REQUEST['search'], 3); } else { $tmpsearch->searchTerm = ''; } $search = $tmpsearch->get_search_clause(); // The link_status to search if(!empty($_REQUEST['status'])) { $status = $_REQUEST['status']; } else { // By default it searches on all if($search) $status = 'published'; else $status = 'published'; } switch ($status) { case 'published': $order_field = 'link_published_date'; $link_date = 'published_date'; $title = " / " . $main_smarty->get_config_vars("PLIGG_Visual_Published_News"); break; case 'queued': $title = " / " . $main_smarty->get_config_vars("PLIGG_Visual_Pligg_Queued"); $order_field = 'link_date'; $link_date = "date"; break; case 'all': $title = ""; $order_field = 'link_date'; $link_date = "date"; break; default: $main_smarty->assign('tpl_center', '404error'); $main_smarty->display($the_template . '/pligg.tpl'); die(); break; } if($status == 'all') { $from_where = "FROM " . table_links . " WHERE link_status!='discard' "; } else { $from_where = "FROM " . table_links . " WHERE link_status='$status' "; } if(($cat=check_integer('category'))) { $from_where .= " AND link_category=$cat "; $category_name = $db->get_var("SELECT category_name FROM " . table_categories . " WHERE category_id = $cat AND category_lang='$dblang'"); $title .= " / " . htmlspecialchars($category_name); } // This doesn't seem to work -kb if($search) { $from_where .= $search; $title = htmlspecialchars($_REQUEST['search']); } $order_by = " ORDER BY $order_field DESC "; $last_modified = $db->get_var("SELECT UNIX_TIMESTAMP(max($order_field)) links $from_where"); $sql = "SELECT link_id $from_where $order_by LIMIT $rows"; } do_rss_header($title); $link = new Link; $links = $db->get_col($sql); if ($links) { foreach($links as $link_id) { $link->id=$link_id; $link->read(); $category_name = $db->get_var("SELECT category_name FROM " . table_categories . " WHERE category_id = $link->category AND category_lang='$dblang'"); $link->link_summary = str_replace("\n", "<br />", $link->link_summary); $link->link_summary = str_replace("’", "'", $link->link_summary); $link->link_summary = str_replace("–", "-", $link->link_summary); $link->link_summary = str_replace("—", "-", $link->link_summary); $link->link_summary = str_replace("“", "\"", $link->link_summary); $link->link_summary = str_replace("”", "\"", $link->link_summary); $description = $link->link_summary; $description = strip_tags($description); $description = htmlspecialchars($description); $title = $link->title; $title = strip_tags($title); $title = htmlspecialchars($title); $link->title = str_replace("á", "a", $link->title); $link->title = str_replace("é", "e", $link->title); $link->title = str_replace("í", "i", $link->title); $link->title = str_replace("ó", "o", $link->title); $link->title = str_replace("ú", "u", $link->title); $link->title = str_replace("ñ", "n", $link->title); $link->title = str_replace("Á", "A", $link->title); $link->title = str_replace("É", "E", $link->title); $link->title = str_replace("Í", "I", $link->title); $link->title = str_replace("Ó", "O", $link->title); $link->title = str_replace("Ú", "U", $link->title); $link->title = str_replace("¿", "", $link->title); $link->title = str_replace("Ñ", "N", $link->title); echo "<item>\n"; echo "<title><![CDATA[". onlyreadables(remove_error_creating_chars($title)) . "]]></title>\n"; echo "<link>".getmyFullurl("storyURL", $link->category_safe_name($link->category), urlencode($link->title_url), $link->id)."</link>\n"; echo "<comments>".getmyFullurl("storyURL", $link->category_safe_name($link->category), urlencode($link->title_url), $link->id)."</comments>\n"; if (!empty($link_date)) echo "<pubDate>".date('D, d M Y H:i:s T', $link->$link_date)."</pubDate>\n"; else echo "<pubDate>".date('D, d M Y H:i:s T', time())."</pubDate>\n"; echo "<dc:creator>" . $link->username($link->author) . "</dc:creator>\n"; echo "<category>" . htmlspecialchars($category_name) . "</category>\n"; echo "<guid>".getmyFullurl("storyURL", $link->category_safe_name($link->category), urlencode($link->title_url), $link->id)."</guid>\n"; echo "<description><![CDATA[" . $description . "<br/><br/>".$link->votes." ".$main_smarty->get_config_vars('PLIGG_Visual_RSS_Votes')." ]]></description>\n"; echo "</item>\n\n"; } } do_rss_footer(); function do_rss_header($title) { global $last_modified, $dblang, $main_smarty; header('Content-type: text/xml; charset=ISO-8859-9', true); echo '<?phpxml version="1.0" encoding="ISO-8859-9"?'.'>' . "\n"; echo '<rss version="2.0" '."\n"; echo 'xmlns:content="http://purl.org/rss/1.0/modules/content/"'."\n"; echo 'xmlns:wfw="http://wellformedweb.org/CommentAPI/"'."\n"; echo 'xmlns:dc="http://purl.org/dc/elements/1.1/"'."\n"; echo '>'. "\n"; echo '<channel>'."\n"; echo '<title>'.htmlspecialchars($main_smarty->get_config_vars("PLIGG_Visual_Name")).$title.'</title>'."\n"; echo '<link>'.my_base_url.my_pligg_base.'</link>'."\n"; echo '<description>'.$main_smarty->get_config_vars("PLIGG_Visual_RSS_Description").' '.$link->votes.' votes</description>'."\n"; echo '<pubDate>'.date('D, d M Y H:i:s T', $last_modified).'</pubDate>'."\n"; echo '<language>'.$dblang.'</language>'."\n"; } function do_rss_footer() { echo "</channel>\n</rss>\n"; } function onlyreadables($string) { for ($i=0;$i<strlen($string);$i++) { $chr = $string{$i}; $ord = ord($chr); if ($ord<32 or $ord>126) { $chr = "~"; $string{$i} = $chr; } } return str_replace("~", "", $string); } ?>
  13. I understand and I truly agree with you guys but I don't have knowledge to create the site myself...
  14. http://www.rantous.com I am not trying to copy but this is the main layout and fuction I want on my site. Thanks for replies
  15. I really appreciate your answer.. I have now this code and works perfectly if ($user->get('gid') < 19) { header("Location: index.php?option=com_user&view=login"); return; } can I ask what the " return; " for?
  16. Hi everyone i have a slightly simple problem but I don't know anything about coding. Here is the code that I want to alter. if ($user->get('gid') < 19) { JError::raiseError( 403, JText::_('ALERTNOTAUTH') ); return; } I instead of giving an error I want it to redirect to a link on the web site in which the link is "index.php?option=com_user&view=login" Can you guys help me please?
  17. Thanks for your fast reply, the code is from a joomla componenet. I have instelled it and when usign it it shows these errors. I have searched internet about these king of errors and I have come accross that the problem is php5 related, this forum is php lrelated that is why i posted here.
  18. Hi guys my server is in PHP 5 so that is why i am getting these problems but there are fixes that I know can be done to correct these problems. If i can get the logic of it if it happens in the future I can fix it but for now I don't know how to solve problems like this because I am noob in PHP coding. the warning messages are as follows. the code in line 166 is $usertypes=array_merge($usertypes1,$usertypes2); the code in line 178 is oreach ($usertypes AS $usertype){ the code in line 68 is while(current($arr) !== FALSE) I really really appreciate any help... ???
  19. High every one I need suggestions to help me choose the right system to start my web site. My web site will be simple. When a visitor comes to my site they see the latest post all listed on the main page they can search by category keywords dates etc. If they want to post an article they can just post it by clicking on "Submit an article". On the new page they just enter their name email address Subject and the article. Or htey can be registered user in that case they can just post the article etc. I am thinking about Drupal, Wordpress, Joomla but I don't know which one fits the best for my needs. I also need good templates so I don't need to create. I would really appraciate any comments.
  20. I eveyone I am a beginner to PHP. not really a beginner I can edit some stuff in PHP, MYSQL but I need to learn the whole concept and coding, also AJAX and CSS in PHP. Do you guys have goode book reccomendation..
  21. Is there any open source auction site? For example: OScommerce is good for ecommrce site. Thanks in advance
  22. I have the following code and it is giving me this error on validation w3 Error Line 69 column 9: end tag for "ul" which is not finished. </ul> The code is as follows <?php get_header();?> <div id="content"> <!-- primary content start --> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <div class="header"> <div class="date"><em class="user"><?php the_author() ?></em> <br/><em class="postdate"><?php the_time('M jS, Y') ?></em></div> <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3> </div> <div class="entry"> <?php the_content(); ?> <?php wp_link_pages(); ?> <?php $sub_pages = wp_list_pages( 'sort_column=menu_order&depth=1&title_li=&echo=0&child_of=' . $id );?> <?php if ($sub_pages <> "" ){?> <h3>Sub Pages List</h3> <ul> <?php echo $sub_pages; ?> </ul> <?php }?> </div> <div class="footer"> <ul> <?php edit_post_link('<li class="readmore">Edit</li>'); ?> </ul> </div> <?php comments_template(); ?> </div> <?php endwhile; ?> <p align="center"><?php posts_nav_link(' - ','&#171; Prev','Next &#187;') ?></p> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php endif; ?> <!-- primary content end --> </div> <?php get_sidebar();?> <?php get_footer();?> if I remove ul in the following line than it does not give me... <div class="footer"> <ul> <?php edit_post_link('<li class="readmore">Edit</li>'); ?> </ul> </div> how can i solve this problem. I really appreciate any help
  23. I have a problem in my server that like in oscommrece setlocale does not work even if i set @setlocale(LC_TIME, 'tr_TR.ISO_8859-9'); dates months show still in English... I think it is a php.ini configuration that is setting it... how should i edit php.ini so it works correctly with Turkish language... Thanks very much in advance.
  24. define('TEXT_INFORMATION', file_get_contents('/test.txt')); thanks for your quick reply but this does not seem to work test.txt is in the same folder as currentphpfileweareworkingon.php
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.