Lütfen Bir Bakın Linkleri Düzenleyemiyorum Yardım!
DPC portal da anasayfanın yanındaki menülere basınca sayfanın tam ortasyında makale ´nin bir kaç cümlesi yazıyor ve makelenin linkine basınca makelenin tamamını okuyabiliyoruz.Ben burada direk anasayfadaki yan menülerden direk link vermek istiyorum.
anasayfadaki linkler şöyle : http://..../index.php?cid=xxxxx (bu x leri kendi değer veriyo burada problem yok)
işte bu linklerin şu şekilde olması gerekiyo : http://..../contents.php?cid=xxxxx gibi olması gerekiyor direk link vermesi için.fakat ben bunu content diye dosya var oradan değiştirildiğini biliyorum fakat düzenleyemedim (daha newbie yim).kodları şunlar nerelerde değişiklik yapmam lazım bi bakarsanız çooook makbule geçer
<?
include ("config.inc.php");
$connection = @mysql_connect($dbhost, $dbuser, $dbpass)
or die ("Can not connect to database");
$db = @mysql_select_db($dbname, $connection)
or die ("Can not select database.");
// Select content
$sql = @mysql_query("SELECT cat_id, name, content, writer, date, hit, active FROM $t_contents WHERE id = ´$cid´")
or die("Can not select content");
while ($row=mysql_fetch_array($sql)) {
$cat_id = $row["cat_id"];
$subject = stripslashes($row["name"]);
$content = stripslashes($row["content"]);
$writer = $row["writer"];
$date = date("j.m.Y", strtotime($row["date"]));
$hit = $row["hit"];
$active = $row["active"];
}
$new_hit = $hit+1;
$sql = @mysql_query("UPDATE $t_contents SET hit = ´$new_hit´ WHERE id = ´$cid´")
or die("Can not select content");
@mysql_close($connection)
or die("Can not close connection");
// Variable for Top navigation bar
$page_name = "contents";
$page_code = $cid;
// Print header
echo PrintTheme("header");
// Select releated links
$rel_links = "<table width="100%" cellspacing="0" cellpadding="0" border="0">";
$rel_links .= "<tr>";
$i = 0;
$connection = @mysql_connect($dbhost, $dbuser, $dbpass)
or die ("Can not connect to database");
$db = @mysql_select_db($dbname, $connection)
or die ("Can not select database.");
$sql_rel = "SELECT co.id, co.name FROM $t_rel cr, $t_contents co WHERE content_id = ´$cid´ AND co.id=cr.releated_id AND co.active = ´1´ ORDER BY co.name";
$result_rel = mysql_query($sql_rel);
while (list($cr_id, $cr_subject) = mysql_fetch_row($result_rel)) {
$cr_subject = stripslashes($cr_subject);
$i++;
$rel_links .= "<td width="25%">:: <a href="$root_url/contents.php?cid=$cr_id">".Translator($cr_id, "content", $user_lang, "subject", $cr_subject)."</a></td>";
if (is_int($i/3)) {
$rel_links .= "</tr>
<tr>";
}
}
$rel_links .= "</tr>";
$rel_links .= "</table>";
// Print content page
$filename = "$theme_root/$user_theme/contents.htm";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
// Print content if content is active
if ($active == 1) {
$contents = eregi_replace ("images", "$theme_url/$user_theme/images", $contents);
$contents = eregi_replace ("---SUBJECT---", Translator($cid, "content", $user_lang, "subject", $subject), $contents);
$contents = eregi_replace ("---CONTENT---", Translator($cid, "content", $user_lang, "body", $content), $contents);
$contents = eregi_replace ("---DATE---", $date, $contents);
$contents = eregi_replace ("---WRITER---", $writer, $contents);
$contents = eregi_replace ("---HITS---", "".LANG_HITS.": ".$new_hit, $contents);
$contents = eregi_replace ("---BACKTOCAT---", SelectTopContentCat($cat_id)." >>", $contents);
$contents = eregi_replace ("---LANG_COMMENTS---", LANG_COMMENTS." ".LANG_ADD_COMMENT."", $contents);
if (($action == "addcomment") && (isset($HTTP_COOKIE_VARS["dcp5_member_id"]))) {
$contents .= "<FORM action="$PHP_SELF?action=write&cid=$cid" method="POST">".LANG_COMMENT.":<br><TEXTAREA name="comment" rows="5" cols="50" class="box"></TEXTAREA><INPUT TYPE="SUBMIT" name="submit" value="".LANG_SEND.""></form>";
} else if (($action == "write") && (isset($HTTP_COOKIE_VARS["dcp5_member_id"]))) {
$result = mysql_query("INSERT INTO $t_comments VALUES (´´, ´$cid´, ´".$HTTP_COOKIE_VARS["dcp5_member_id"]."´, ´$comment´, now(), ´1´)");
$contents .= LANG_COMMENT_ADDED;
}
$contents = eregi_replace ("---COMMENTS---", ContentComments($cid), $contents);
if ($i > 0) {
$contents = eregi_replace ("---LANG_RELLINKS---", LANG_RELLINKS, $contents);
$contents = eregi_replace ("---RELLINKS---", $rel_links, $contents);
} else {
$contents = eregi_replace ("---LANG_RELLINKS---", "", $contents);
$contents = eregi_replace ("---RELLINKS---", "", $contents);
}
// Print error if content is not active
} else {
$contents = eregi_replace ("images", "$theme_url/$user_theme/images", $contents);
$contents = eregi_replace ("---SUBJECT---", LANG_UNACTIVECONTENT, $contents);
$contents = eregi_replace ("---CONTENT---", LANG_UNACTIVECONTENTERR, $contents);
$contents = eregi_replace ("---DATE---", "", $contents);
$contents = eregi_replace ("---WRITER---", "", $contents);
$contents = eregi_replace ("---HITS---", "", $contents);
$contents = eregi_replace ("---BACKTOCAT---", SelectTopContentCat($cat_id)." >>", $contents);
$contents = eregi_replace ("---LANG_RELLINKS---", "", $contents);
$contents = eregi_replace ("---RELLINKS---", "", $contents);
}
echo $contents;
@mysql_close($connection);
echo PrintTheme("footer");
?>
işte burada nasıl değişiklikler yapmalıyım ki linkler istediğim gibi olsun
saygılarımla
