Retrieving download info???

All support enquiries for DFH go in here...

Retrieving download info???

Postby test » Wed Oct 26, 2011 10:38 am

I am trying to make my future service more popular, by adding a very simple Facebook (OpenGraph, Like, Send buttons etc), SEO integration, and even AddThis.com sharing button, and for starters, I got something like this:

Code: Select all
<meta property="og:title" content="<?php echo $foundfile[1];?>" />
<meta property="og:url" content="<?php echo $short .$filedata[0];?>" />
<meta property="og:site_name" content="<?php echo $compname; ?>" />
<meta property="og:description" content="<?php echo $fcontent[6];?>" />
<meta name="description" content="<?php echo $fcontent[6];?>" />
<meta name="keywords" content="<?php echo $foundfile[1];?>, <?php echo $foundfile[1];?>" />


But I just can't seem to get the right information from the echoes. I don't get any information at all.

What can I do to get the wanted information? I'm using DFH v1.2.2.

Thanks alot.
test
Standard Member
 
Posts: 37
Joined: Tue Apr 05, 2011 1:21 pm

Re: Retrieving download info???

Postby test » Wed Oct 26, 2011 11:13 pm

Oh, and it will be nice to also get the Category variable, which I will be able to show in the file page...

I think that all these valuable variables should be centralized in one main file, which will make it better for displaying the info on any place (maybe even in embed frame of the download or something)...

Just my idea. :)

Thanks for this great script.
test
Standard Member
 
Posts: 37
Joined: Tue Apr 05, 2011 1:21 pm

Re: Retrieving download info???

Postby SamEA » Fri Nov 04, 2011 3:19 am

What information do you require? e.g. File name, Downloaded times, or etc..
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: Retrieving download info???

Postby test » Fri Nov 04, 2011 11:41 pm

File name, link to the file's download page (e.g. mydomain.com/123filename.zip), my site name (e.g. $compname), File description...
Like I said, I tried using the variables from the script, but no luck.

Thanks for your help.
test
Standard Member
 
Posts: 37
Joined: Tue Apr 05, 2011 1:21 pm

Re: Retrieving download info???

Postby test » Sat Nov 05, 2011 12:39 am

Also, the selected category (if categories are enabled). :) Thanks again.
test
Standard Member
 
Posts: 37
Joined: Tue Apr 05, 2011 1:21 pm

Re: Retrieving download info???

Postby SamEA » Mon Nov 07, 2011 2:29 pm

test wrote:I am trying to make my future service more popular, by adding a very simple Facebook (OpenGraph, Like, Send buttons etc), SEO integration, and even AddThis.com sharing button, and for starters, I got something like this:

Code: Select all
<meta property="og:title" content="<?php echo $foundfile[1];?>" />
<meta property="og:url" content="<?php echo $short .$filedata[0];?>" />
<meta property="og:site_name" content="<?php echo $compname; ?>" />
<meta property="og:description" content="<?php echo $fcontent[6];?>" />
<meta name="description" content="<?php echo $fcontent[6];?>" />
<meta name="keywords" content="<?php echo $foundfile[1];?>, <?php echo $foundfile[1];?>" />


But I just can't seem to get the right information from the echoes. I don't get any information at all.

What can I do to get the wanted information? I'm using DFH v1.2.2.

Thanks alot.


From what I can see, you seem to have the correct strings. If DFH is not displaying the echos, this most probably means you are executing the code in the wrong section. Show me the full file of where you are placing those echos.
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: Retrieving download info???

Postby test » Tue Nov 08, 2011 10:08 am

Well, it's a bit "modified" header.php file I've made, to be included only in the DL page, and I call it "dl_header.php" (I modified ./download.php, and changed the inclusion of "header.php" to "dl_header.php" where I needed it), and this is the content:

Code: Select all
<?php
require_once("./config.php");
require_once("./functions.inc.php");

if(in_array($language, $LANGUAGE_LIST)) {
  include('./lang/'.$language.'.php');
} else {
  include('./lang/'.$LANGUAGE_LIST[0].'.php');
}
?>
<!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"
      xmlns:og="http://ogp.me/ns#"
      xmlns:fb="http://www.facebook.com/2008/fbml"
      xmlns:fb="http://ogp.me/ns/fb#" dir="rtl" lang="he" xml:lang="he">
<head>
<meta property="og:title" content="<?php echo $foundfile[1];?>" />
<meta property="og:url" content="<?php echo $short .$filedata[0];?>" />
<meta property="og:site_name" content="<?php echo $compname; ?>" />
<meta property="fb:admins" content="MyFBID" />
<?php
if(isset($foundfile[6])){
?>
<meta property="og:description" content="<?php echo $foundfile[6];?>" />
<meta name="description" content="<?php echo $foundfile[6];?>" />
<? } else { ?>
<meta property="og:description" content="Description to show if the user haven't set a description." />
<meta name="description" content="Description to show if the user haven't set a description." />
<? } ?>
<meta name="keywords" content="Download <?php echo $foundfile[1];?>, <?php echo $foundfile[1];?> for download" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="content-language" content="he" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="robots" content="index, follow, noarchive" />
<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" />
<link rel="shortcut icon" href="./images/favicon.ico" />
<title><? echo $compname . " - " . $slogan;?></title>
<script src="<? echo $scripturl; ?>styles/<?php echo $style; ?>/scripts/clock.js" type="text/javascript"></script>
<script type="text/javascript">
    var addthis_config = {"data_track_clickback": true, services_exclude:'print', ui_language: 'he'};
</script>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4ea81010145aef81"></script>
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
  {lang: 'iw'}
</script>
</head>

<body onload="javascript:startclock();">

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) {return;}
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/he_IL/all.js#xfbml=1&appId=258928694152755";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


Thanks for your help!
test
Standard Member
 
Posts: 37
Joined: Tue Apr 05, 2011 1:21 pm

Re: Retrieving download info???

Postby SamEA » Tue Nov 08, 2011 10:59 am

That will not work, because ./dl_header.php is executed before ./download.php. In other words, you can only use the strings after they have been assigned e.g. after the lines assigning the strings in ./download.php. However, if you require them to be executed before ./download.php assigns them, I can provide you with a workaround.
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: Retrieving download info???

Postby SamEA » Tue Nov 08, 2011 11:01 am

Why don't you just execute your code in ./styles/Indigo/download.php? That will also work.
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: Retrieving download info???

Postby test » Thu Nov 10, 2011 12:10 pm

Well, I think I'll need the workaround, because <meta> tags supposed to be inside the <head> tag of the HTML page, that's how it supposed to be, in my opinion...
I can't start putting meta tags inside ./styles/Indigo/download.php, because I need them in the header, which don't exist in ./styles/Indigo/download.php....
test
Standard Member
 
Posts: 37
Joined: Tue Apr 05, 2011 1:21 pm

Next

Return to Daddy's File Host v1.X

Who is online

Users browsing this forum: No registered users and 7 guests

cron