41
kozuch82
Re: PD-Downloads 1.0
  • 2006/5/8 20:36

  • kozuch82

  • Just popping in

  • Posts: 48

  • Since: 2006/4/2 2


Thank you!

It seems that really was due to my host's PHP5. I renamed $this to $sort_this and that seems to work wonderfully now!!!

Thanx!



42
kozuch82
Re: PD-Downloads 1.0
  • 2006/5/2 22:04

  • kozuch82

  • Just popping in

  • Posts: 48

  • Since: 2006/4/2 2


I can not remember exactly what was my problem with 1.2 but I guess it didnt install properly at all so I dropped it... I am pretty happy with the 1.0 (besides these bugs).

The code of topten.php would be

<?php

/**

* $Id: topten.php v 1.0.3 06 july 2004 Liquid Exp $

* Module: PD-Downloads

* Version: v1.0

* Release Date: 04. März 2005

* Author: Power-Dreams Team

* Licence: GNU

*/



include 'header.php';

include_once XOOPS_ROOT_PATH . '/class/xoopstree.php';



global $xoopsDB, $xoopsUser;



$mytree = new XoopsTree($xoopsDB -> prefix('PDdownloads_cat'), "cid", "pid");

$xoopsOption['template_main'] = 'PDdownloads_topten.html';



$groups = (is_object($xoopsUser)) ? $xoopsUser -> getGroups() : XOOPS_GROUP_ANONYMOUS;

$module_id = $xoopsModule -> getVar('mid');

$gperm_handler = & xoops_gethandler('groupperm');



include XOOPS_ROOT_PATH . '/header.php';



$action_array = array('hit' => 0, 'rate' => 1);

$list_array = array('hits', 'rating');

$lang_array = array(_MD_PDD_HITS, _MD_PDD_RATING);



$sort = (isset($_GET['list']) && in_array($_GET['list'], $action_array)) ? $_GET['list'] : 'rate';

$this = $action_array[$sort];

$sortDB = $list_array[$this];



$catarray['imageheader'] = PDd_imageheader();

$catarray['letters'] = PDd_letters();

$catarray['toolbar'] = PDd_toolbar();

$xoopsTpl -> assign('catarray', $catarray);



$arr = array();

$result = $xoopsDB -> query("SELECT cid, title FROM " . $xoopsDB -> prefix('PDdownloads_cat') . " WHERE pid=0");



$e = 0;

$rankings = array();

while (list($cid, $ctitle) = $xoopsDB -> fetchRow($result))

{

if ($gperm_handler -> checkRight('PDDownCatPerm', $cid , $groups, $module_id))

{

$query = "SELECT lid, cid, title, hits, rating, votes, platform FROM " . $xoopsDB -> prefix('PDdownloads_downloads') . " WHERE published > 0 AND published <= " . time() . " AND (expired = 0 OR expired > " . time() . ") AND offline = 0 AND (cid=$cid";

$arr = $mytree -> getAllChildId($cid);

for($i = 0;$i < count($arr);$i++)

{

$query .= " or cid=" . $arr[$i] . "";

}

$query .= ") order by " . $sortDB . " DESC";

$result2 = $xoopsDB -> query($query, 10, 0);

$filecount = $xoopsDB -> getRowsNum($result2);



if ($filecount > 0)

{

$rankings[$e]['title'] = $myts -> htmlSpecialChars($ctitle);

$rank = 1;



while (list($did, $dcid, $dtitle, $hits, $rating, $votes) = $xoopsDB -> fetchRow($result2))

{

if ($gperm_handler -> checkRight('PDDownFilePerm', $did, $groups, $xoopsModule -> getVar('mid')))

{

$catpath = $mytree -> getPathFromId($dcid, "title");

$catpath = basename($catpath);



$dtitle = $myts -> htmlSpecialChars($dtitle);

//if ($catpath != $ctitle)

//{

// $dtitle = $myts -> htmlSpecialChars($ctitle); //. $ctitle;

//}



$rankings[$e]['file'][] = array('id' => $did, 'cid' => $dcid, 'rank' => $rank, 'title' => $dtitle, 'category' => $catpath, 'hits' => $hits, 'rating' => number_format($rating, 2), 'votes' => $votes);

$rank++;

}

}

$e++;

}

}

}



$xoopsTpl -> assign('lang_sortby' , $lang_array[$this]);







$xoopsTpl -> assign('rankings', $rankings);

include XOOPS_ROOT_PATH . '/footer.php';



include XOOPS_ROOT_PATH.'/footer.php';



?>



43
kozuch82
PD-Downloads 1.0
  • 2006/5/2 13:04

  • kozuch82

  • Just popping in

  • Posts: 48

  • Since: 2006/4/2 2


Hi,

i get this:
Fatal error: Cannot re-assign $this in /home/standyta/public_html/games/modules/PDdownloads/topten.php on line 30

if i click on one of "Popular" or "Top rated" links. Anybody can help me? I tried to use PD-Downloads 1.2 but it didnt work for me so i would need to repair this one...

Thank you!



44
kozuch82
Page Titles for better SEO???
  • 2006/5/2 10:06

  • kozuch82

  • Just popping in

  • Posts: 48

  • Since: 2006/4/2 2


Hi,

am pretty new to XOOPS... but have some experience with other cms like Drupal etc. The one of the very few bad things of XOOPS is in my opinion not very big SE friendliness in the default settings.

I have a problem with my PD-downloads while i would like to have the download name in the page title on its details page because of a better SEO.

Can someone give me a hint on this? Can i somehow modify the theme to get it there?

Thank you,
Kozuch



45
kozuch82
Voting in polls do not work for anonymout???
  • 2006/4/19 13:35

  • kozuch82

  • Just popping in

  • Posts: 48

  • Since: 2006/4/2 2


The block with buttons is shown but anonymous cannot vote... is it possible to let them vote???



46
kozuch82
Newbie: The best forum module for XOOPS???
  • 2006/4/3 10:29

  • kozuch82

  • Just popping in

  • Posts: 48

  • Since: 2006/4/2 2


Hi,

new to XOOPS and looking for the best modules for each basic function (news, downloads, forum etc.). Could i get some advices on the forum module? I use the latest 2.0. XOOPS version, but before i install the core newbb forum, i just want to ask, if it is not better to install the CBB right away (CBB the succesor of newbb???). I saw also also the Invision Power Board.

Which is the best if i am looking for a mid-ranged forum with no special functions and i want some developer perspective (i mean like it will be maintained for a while still).

Thx,
Jan




TopTop
« 1 2 3 4 (5)



Login

Who's Online

267 user(s) are online (163 user(s) are browsing Support Forums)


Members: 0


Guests: 267


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits