File Description Question

All support enquiries for DFH go in here...

File Description Question

Postby thirty5tech » Mon May 30, 2011 6:12 pm

Hey guys, thanks again for a great script . I have a question which hope ya guys are able to help me with ..

Is there a way I could add the file description to the description meta tag ..

I will like to have the File Description show up as a Title for the page as well as I only type the name of the homebrew app on the file description ..

I have look at the codes .

Code: Select all
<table cellspacing=1 cellpadding=2 border=0 bgcolor=#C0C0C0>
<tr><td align=left bgcolor=#F4F4F4 background="img/button03.gif"><?php echo $lang[fn6];?>:</td><td bgcolor=#EEF4FB background="img/button03.gif"><font color=#000080><?php echo $foundfile[1];?></td></tr>
<tr><td align=left bgcolor=#F4F4F4 background="img/button03.gif\"><?php echo $lang[fbu];?>:</td><td bgcolor=#EEF4FB background=\"img/button03.gif"><font color=#000080><?php echo $quantity .$check1;?></td></tr>
<tr><td align=left bgcolor=#F4F4F4 background="img/button03.gif\"><?php echo $lang[dl_filesize];?>:</td><td bgcolor=#EEF4FB background="img/button03.gif"><font color=#000080><?php echo $fsizetxt;?></td></tr>
<tr><td align=left bgcolor=#F4F4F4 background="img/button03.gif\"><?php echo $lang[dl_file_dl];?>:</td><td bgcolor=#EEF4FB background="img/button03.gif"><font color=#000080><?php echo $foundfile[5] .$lang[dl_file_dl1];?></td></tr>
<tr><td align=left bgcolor=#F4F4F4 background="img/button03.gif\"><?php echo $lang[dl_last_dl];?>: </td><td bgcolor=#EEF4FB background="img/button03.gif"><font color=#000080><?php echo date('Y-m-d G:i', $foundfile[4]);?></td></tr><p>
<?php
if(isset($foundfile[6])){
?>
<tr><td align=left bgcolor=#F4F4F4 background="img/button03.gif"><?php echo $test;?></td><td bgcolor=#EEF4FB background="img/button03.gif"><font color=#000080><?php echo $test4;?></td></tr>
<?php
}
?>
   </td></tr></table>


For example , I could get the following to display

File Name:
File Bandwith Used:
File Size:
File Downloaded:
Last Download:
File Description

IF I added a top of the header page . However, those are the only thing it will show. It will not show the file name itself, Files description or any other information ..
thirty5tech
Standard Member
 
Posts: 16
Joined: Sun Mar 13, 2011 2:27 am

Re: File Description Question

Postby SamEA » Tue May 31, 2011 1:36 am

thirty5tech wrote:Hey guys, thanks again for a great script . I have a question which hope ya guys are able to help me with ..

Is there a way I could add the file description to the description meta tag ..

I will like to have the File Description show up as a Title for the page as well as I only type the name of the homebrew app on the file description ..

I have look at the codes .

Code: Select all
<table cellspacing=1 cellpadding=2 border=0 bgcolor=#C0C0C0>
<tr><td align=left bgcolor=#F4F4F4 background="img/button03.gif"><?php echo $lang[fn6];?>:</td><td bgcolor=#EEF4FB background="img/button03.gif"><font color=#000080><?php echo $foundfile[1];?></td></tr>
<tr><td align=left bgcolor=#F4F4F4 background="img/button03.gif\"><?php echo $lang[fbu];?>:</td><td bgcolor=#EEF4FB background=\"img/button03.gif"><font color=#000080><?php echo $quantity .$check1;?></td></tr>
<tr><td align=left bgcolor=#F4F4F4 background="img/button03.gif\"><?php echo $lang[dl_filesize];?>:</td><td bgcolor=#EEF4FB background="img/button03.gif"><font color=#000080><?php echo $fsizetxt;?></td></tr>
<tr><td align=left bgcolor=#F4F4F4 background="img/button03.gif\"><?php echo $lang[dl_file_dl];?>:</td><td bgcolor=#EEF4FB background="img/button03.gif"><font color=#000080><?php echo $foundfile[5] .$lang[dl_file_dl1];?></td></tr>
<tr><td align=left bgcolor=#F4F4F4 background="img/button03.gif\"><?php echo $lang[dl_last_dl];?>: </td><td bgcolor=#EEF4FB background="img/button03.gif"><font color=#000080><?php echo date('Y-m-d G:i', $foundfile[4]);?></td></tr><p>
<?php
if(isset($foundfile[6])){
?>
<tr><td align=left bgcolor=#F4F4F4 background="img/button03.gif"><?php echo $test;?></td><td bgcolor=#EEF4FB background="img/button03.gif"><font color=#000080><?php echo $test4;?></td></tr>
<?php
}
?>
   </td></tr></table>


For example , I could get the following to display

File Name:
File Bandwith Used:
File Size:
File Downloaded:
Last Download:
File Description

IF I added a top of the header page . However, those are the only thing it will show. It will not show the file name itself, Files description or any other information ..


Glad you're liking the script :).

If Short URL is disabled, this solution should work:

1. Open ./styles/Indigo/header.php
2. Find
Code: Select all
<title><? echo $compname . " - " . $slogan;?></title>

3. Replace with
Code: Select all
<?
// Check if download page is opened
if(strstr($_SERVER['PHP_SELF'], 'download.php') && isset($_GET['file'])){
// If download page is opened, display this
?>
<title><? echo $compname . " - " . $_GET['file'];?></title>
<?php
}else{
// Else if download page is not opened, display this
echo $page;
?>
<title><? echo $compname . " - " . $slogan;?></title>
<?php
}
?>
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: File Description Question

Postby thirty5tech » Tue May 31, 2011 6:46 pm

Thanks it has work like a charm .

However, I do have one more question, is there a way to display the description instead of the File name itself ?

If not, Then this fix is fine, but would love it if there was a way to replace the file name with the Description ..

Image

as you could see from the picture, The file description is what I was hoping for, But if there is no way to display it, Then this is fine ..
thirty5tech
Standard Member
 
Posts: 16
Joined: Sun Mar 13, 2011 2:27 am

Re: File Description Question

Postby SamEA » Tue May 31, 2011 9:57 pm

thirty5tech wrote:Thanks it has work like a charm .

However, I do have one more question, is there a way to display the description instead of the File name itself ?

If not, Then this fix is fine, but would love it if there was a way to replace the file name with the Description ..

Image

as you could see from the picture, The file description is what I was hoping for, But if there is no way to display it, Then this is fine ..


Sorry about that, I did not fully understand your query at first. To claify, do you want the file description to be added to a meta tag, or do you want it to be displayed as one of the boxes, without the file name?
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: File Description Question

Postby thirty5tech » Wed Jun 01, 2011 9:18 am

Sorry as my English is not that good.

As you could see from the picture
Image



I will like the File Description to be display as a Page Tittle and and Meta Tag Description if possible .

I Do hope you understand , Sorry about my bad English ..

IF that is possible, Then is good, I don't need nothing else to be display on the page tittle itself only the file description if possible .
thirty5tech
Standard Member
 
Posts: 16
Joined: Sun Mar 13, 2011 2:27 am

Re: File Description Question

Postby SamEA » Wed Jun 01, 2011 5:28 pm

thirty5tech wrote:Sorry as my English is not that good.

As you could see from the picture
Image



I will like the File Description to be display as a Page Tittle and and Meta Tag Description if possible .

I Do hope you understand , Sorry about my bad English ..

IF that is possible, Then is good, I don't need nothing else to be display on the page tittle itself only the file description if possible .


Okay I think I understand you now. You want it similar to this: Your Page Title - File Description, and a meta description with the file description in it?
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: File Description Question

Postby thirty5tech » Fri Jun 03, 2011 7:35 am

Correct that is what I mean :D

The page tittle should be the file description .

and meta tag description should also have File description as well .
thirty5tech
Standard Member
 
Posts: 16
Joined: Sun Mar 13, 2011 2:27 am

Re: File Description Question

Postby SamEA » Fri Jun 03, 2011 5:05 pm

thirty5tech wrote:Correct that is what I mean :D

The page tittle should be the file description .

and meta tag description should also have File description as well .


1. Open ./styles/Indigo/header.php
2. Replace all code with the following:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
<?php
if(strstr($_SERVER['PHP_SELF'], 'download.php') && isset($_GET['file']) && is_file('files/' .$_GET['file'].'.dfh')){
$fop1 =  fopen('files/' .$_GET['file'].'.dfh', 'r');
$fcontent = fread($fop1, '999');
fclose($fop1);
$fcontent = explode("|", $fcontent);
}
?>
<meta name="description" content="<?php echo $fcontent[6];?>"/>
<meta name="keywords" content="keywords"/>
<meta name="author" content="author"/>
<link rel="stylesheet" type="text/css" href="./css/global.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="./styles/<?php echo $style; ?>/style.css" media="screen"/>
<?php
// Check if download page is opened
if(strstr($_SERVER['PHP_SELF'], 'download.php') && isset($_GET['file']) && is_file('files/' .$_GET['file'].'.dfh')){
// If download page is opened, display this
?>
<title><? echo $compname . " - " . $fcontent[6];?></title>
<?php
}else{
// Else if download page is not opened, display this
echo $page;
?>
<title><? echo $compname . " - " . $slogan;?></title>
<?php
}
?>
</head>

<body>

<div class="container">

   <div class="header">
      
      <div class="title">
         <h1><?php echo $compname ." - " .$slogan; ?></h1>
      </div>

      <div class="navigation">
<a class="toplinks" href="index.php"><? echo $lang[top_upload];?></a>
<?php if($imgupload == true){?><a class="toplinks" href="index.php?page=img"><? echo $lang[top_imageup];?></a><?}?>
<?php if ($_SESSION['islogged'] <> true) {?><a class="toplinks" href="index.php?page=login"><?php echo $lang[login];?></a>
<?php }else{?><a class="toplinks" href="index.php?page=userpanel"><?php echo $lang[myfiles];?></a><?php }?>
<?php if($enable_filelist == true){?><a class="toplinks" href="files.php"><?php echo $lang[viewfiles];?></a><?}?>
<?php if($enable_imglist == true){?><a class="toplinks" href="images.php"><?php echo $lang[viewimg];?></a><?}?>
<a class="toplinks" href="index.php?page=faq"><? echo $lang[top_faq];?></a>
<a class="toplinks" href="top.php"><? echo $lang[top_top];?></a>

<span></span></div>
      </div>

   </div>

   <div class="main">
      
      <div class="content">


Let me know if this is what you originally wanted.
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: File Description Question

Postby thirty5tech » Fri Jun 03, 2011 6:01 pm

Your the best, Thanks for your help .. Everything work out fine and now I'm able to see the File Description in the meta tag ..
thirty5tech
Standard Member
 
Posts: 16
Joined: Sun Mar 13, 2011 2:27 am

Re: File Description Question

Postby SamEA » Fri Jun 03, 2011 6:15 pm

thirty5tech wrote:Your the best, Thanks for your help .. Everything work out fine and now I'm able to see the File Description in the meta tag ..


Glad it all worked out for you :).
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm


Return to Daddy's File Host v1.X

Who is online

Users browsing this forum: No registered users and 12 guests

cron