xoops forums

Forum Index


Board index » All Posts (Wheeler)




Wheeler

Not too shy to talk
Posted on: 2005/3/10 1:37
Wheeler
Wheeler (Show more)
Not too shy to talk
Posts: 145
Since: 2004/10/29
#1

Re: Alphabetical Order Bugfix

Yes, these type of modules do seem a little useless. In time, when I get my business directory up, I will have a go at it.


Wheeler

Not too shy to talk
Posted on: 2005/3/8 18:16
Wheeler
Wheeler (Show more)
Not too shy to talk
Posts: 145
Since: 2004/10/29
#2

Re: [myEDITO] A user homepage version for test

Easy install, wysiwyg editor working perfect!
http://test.band-wars.com/modules/myEdito/

During install:
Notice [PHP]: Undefined index: description in file modules/system/admin/modulesadmin/modulesadmin.php line 390

This url...
http://test.band-wars.com/modules/myE ... t.php?op=mod&Id_content=1
Gives this warning...
Warning [PHP]: array_push(): First argument should be an array in file class/module.textsanitizer.php line 113

userinfo.php gives a notice...
Notice [PHP]: Undefined index: time in file userinfo.php line 190

error: page title tag in main XOOPS theme does not work at module index? It works at a myedito.

typo: [ blockbreak] to [blockbreak] on submit page.
[blockbreak] doesn't seem to work?


Wheeler

Not too shy to talk
Posted on: 2005/3/8 17:16
Wheeler
Wheeler (Show more)
Not too shy to talk
Posts: 145
Since: 2004/10/29
#3

Re: Alphabetical Order Bugfix

hey thanks Mith, it's so obvious lol.

tzvook,
from recent threads, I am aware you have a hacked version of xdir. I also thought I read somewhere your alpha links hack came from WF-Downloads. Sorry, I guess I can not help you. This is beyond the focus of the work which I'm currently conducting.

The code I have should fix the alphabetical listings when the 'pagenav' is used. If your ordered listings carries over to the next page you are okay.


Wheeler

Not too shy to talk
Posted on: 2005/3/8 6:36
Wheeler
Wheeler (Show more)
Not too shy to talk
Posts: 145
Since: 2004/10/29
#4

Re: Alphabetical Order Bugfix

By the way I have the category 'sort by' feature currently disabled. I wonder if using 'sort by' would affect the
<{$letter_sortby}>
and display the current $list value. Could be called
<{$sorted_by}>
Quote:
$xoopsTpl -> assign('letter_sortby' , $list); // Added by Wheeler

to
Quote:
$xoopsTpl -> assign('sorted_by' , $list); // Added by Wheeler


Does anybody else have similar problems with 'sort by' as they do with 'Alphabet Links'?


Wheeler

Not too shy to talk
Posted on: 2005/3/8 4:46
Wheeler
Wheeler (Show more)
Not too shy to talk
Posts: 145
Since: 2004/10/29
#5

Re: Xdirectory Alphabetic Order Hack ... need fresh eyes

Here it is, I hope it works for you.
Alphabetical Order Bugfix


Wheeler

Not too shy to talk
Posted on: 2005/3/8 4:44
Wheeler
Wheeler (Show more)
Not too shy to talk
Posts: 145
Since: 2004/10/29
#6

Re: Alphabetical Order Bugfix

I also hope I recorded each code added or changed properly, maybe some code not displayed in blue. I started without keeping track of modifications, then went back looking for it. Sorry.

Other features done? To be submitted to the WF-Projects Team for their future releases...

-rated and reviewed averages by number (eg. 7.66), image display still works, may use both.

-added a new scoring system using number of downloads, votes, and reviews, combined with rated and reviewed averages.

-Added path to display for download items list, instead of just the (sub)category which the download item belongs to.

-Added functionality, display categories and download items while group access set to no, instead of completely hiding them.

-Email bug fixes, There are more than just the one 'Email a Friend' bug.

-Template work:
---Never get a 'You don't have permission to access' message again.
---Logical display message for 'no downloads added to (category OR letter) listing.'


Wheeler

Not too shy to talk
Posted on: 2005/3/8 4:32
Wheeler
Wheeler (Show more)
Not too shy to talk
Posts: 145
Since: 2004/10/29
#7

Alphabetical Order Bugfix

The alphabet menu (I believe it is by catzwolf from WF-Projects Team) has had some problems reported recently. I think I have found a solution. I have tested it on WF-Downloads and it seems to work fine.

Please give code suggestions and feedback for I am a beginner php programmer, if that.

Alphabet menu fix: display current letter on page and 'Next page' works while listing by alphabetical order.

New Template Smarty Tags: <{$letter_sortby}> to display the currently sorted letter.

Add this code to viewcat.php
Quote:

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

global $xoopsModuleConfig, $myts, $xoopsModules;

$start = isset($_GET['start']) ? intval($_GET['start']) : 0;
$orderby = isset($_GET['orderby']) ? convertorderbyin($_GET['orderby']) : $xoopsModuleConfig['filexorder'];
$cid = (isset($_GET['cid']) && $_GET['cid'] > 0) ? $_GET['cid'] : 0;
$list = isset($_GET['list']) ? $_GET['list'] : 0; // Added by Wheeler

----- Search down page -----

/**
* Breadcrumb
*/
$mytree = new XoopsTree($xoopsDB->prefix('xxxxx_cat'), "cid", "pid");
$pathstring = "<a href='index.php'>" . _MD_XXX_MAIN . "</a> : ";
$pathstring .= $mytree->getNicePathFromId($cid, "title", "viewcat.php?op=");
$xoopsTpl->assign('category_path', $pathstring);
$xoopsTpl->assign('category_id', $cid);
$xoopsTpl -> assign('letter_sortby' , $list); // Added by Wheeler
$arr = $mytree->getFirstChild($cid, "weight");

----- Search down page -----

/**
* Extract Download information from database
*/
$xoopsTpl->assign('show_categort_title', true);
$sql = "SELECT * FROM " . $xoopsDB->prefix('xxxxx_downloads') . " ";
if (isset($_GET['selectdate']))
{
$sql .= "WHERE TO_DAYS(FROM_UNIXTIME(published)) = TO_DAYS(FROM_UNIXTIME(" . $_GET['selectdate'] . "))
AND published > 0 AND published <= " . time() . " AND (expired = 0 OR expired > " . time() . ")
AND offline = 0 ORDER BY published DESC";
$result = $xoopsDB->query($sql, $xoopsModuleConfig['perpage'] , $start);
$total_numrows['count'] = $xoopsDB->getRowsNum($xoopsDB->query($sql));
} elseif (isset($_GET['list']))
{
$sql .= "WHERE title LIKE '" . $_GET['list'] . "%' AND published > 0 AND
published <= " . time() . " AND (expired = 0 OR expired > " . time() . ") AND offline = 0
ORDER BY " . $orderby;
$result = $xoopsDB->query($sql, $xoopsModuleConfig['perpage'] , $start);
$total_numrows['count'] = $xoopsDB->getRowsNum($xoopsDB->query($sql)); // Added by Wheeler
}
else
{
$sql .= "WHERE cid=" . $cid . " AND published > 0 AND published <= " . time() . "
AND (expired = 0 OR expired > " . time() . ") AND offline = 0
ORDER BY " . $orderby;
$result = $xoopsDB->query($sql, $xoopsModuleConfig['perpage'] , $start);
$xoopsTpl->assign('show_categort_title', false);
$total_numrows = xxx_getTotalItems($cid);
}

----- Search down page -----

/**
* Nav page render
*/
include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
if (isset($_GET['selectdate']))
{
$pagenav = new XoopsPageNav($total_numrows['count'], $xoopsModuleConfig['perpage'] , $start, 'start', 'list=' . $_GET['selectdate']);
}
else if ($list) // Added by Wheeler
{
$pagenav = new XoopsPageNav($total_numrows['count'], $xoopsModuleConfig['perpage'] , $start, 'start', 'list=' . $list); // Added by Wheeler
}

else
{
$pagenav = new XoopsPageNav($total_numrows['count'], $xoopsModuleConfig['perpage'] , $start, 'start', 'cid=' . $cid);
}
$page_nav = $pagenav->renderNav();
$istrue = (isset($page_nav) && !empty($page_nav)) ? true : false;
$xoopsTpl->assign('page_nav', $istrue);
$xoopsTpl->assign('pagenav', $page_nav);
}


Hmmm? I hope this code displays properly.

Let me know what you think!?


Wheeler

Not too shy to talk
Posted on: 2005/3/8 2:54
Wheeler
Wheeler (Show more)
Not too shy to talk
Posts: 145
Since: 2004/10/29
#8

Re: [myEDITO] A user homepage version for test

Hahahaaa! solo71, good work. I am launching a new website with one of the newest and coolest modules available. Top notch!


Wheeler

Not too shy to talk
Posted on: 2005/3/8 2:46
Wheeler
Wheeler (Show more)
Not too shy to talk
Posts: 145
Since: 2004/10/29
#9

Re: The incredible disappearing content trick

russtik,
thanks for all that great info. I have built a 'tables only' theme with the content column first in the code. What do you think? This seems to work okay, it is designed on simplicity, so browsers won't crunch too many numbers rendering tables.

<table class="wrapper">
<
tr>

<
td></td>

<
td class="content" rowspan="2">
<
table id="spacer"><tr><td></td></tr></table>
centre column
</td>

<
td></td>

</
tr>
<
tr>

<
td class="spine">
left column
</td>

<
td class="spine">
right column
</td>

</
tr>
</
table>


One more question, what are the pros and cons when using tables vs div's? I have not been able to get this information. Thanks again.


Wheeler

Not too shy to talk
Posted on: 2005/3/8 2:27
Wheeler
Wheeler (Show more)
Not too shy to talk
Posts: 145
Since: 2004/10/29
#10

Re: Xdirectory Alphabetic Order Hack ... need fresh eyes

I think I have a solution. Let me try to gather my notes for changes, then I'll post it.

I have done alot of work on wf-downloads, which I am going to submit all my hacks and bugfixes to the wf-sections team.

Unlike... https://xoops.org/modules/news/article.php?storyid=2102 ... and no, I didn't get any code from the pd guys.

Be back in a bit.



TopTop
(1) 2 3 4 ... 12 »