1
fredski
Xdirectory, adding Spaw and other tweaks
  • 2004/7/21 7:22

  • fredski

  • Quite a regular

  • Posts: 265

  • Since: 2004/1/26


I've installed the Xdirectory module on my test server and decided that with a few tweaks it will be just the thing I'm looking for. But how to do the tweaks thats the question?? I've changed the map feature to work with U.K maps (if anyone needs the code for this I will post it here, just ask) but still need some help on the following.................

1) I've seen a button for emailing the business on other sites with this module but so far can't see it on mine, clues anyone??? (also I need to if it can be set to email the business and the webmaster)

2) I need to add spaw editor to the module as the standard XOOPS editor isn't up to the job of how I want the listings to look.

3) I need to add say 5 more fields to the listing, 2 of them need to be searchable by. Whats the easiest way to go about that? they need to be editable in the admin interface for that listing.

4) The module dosn't look like it has been integrated into XOOPS search yet, has anyone done this?

5) I need to add some more images rather than just the one screen shot (which I'm using for the company logo) in the admin section and have them displaying in a column on the business description page, so that they may use them for product images, Photo of store or factory, staff etc whats the easiest way to do this?

I'm sure there will be other tweaks that I will need but isn't there always :) Help with any of the above will be mucho appreciated. Thanx

2
fredski
Xdirectory, code for UK maps
  • 2004/7/21 7:33

  • fredski

  • Quite a regular

  • Posts: 265

  • Since: 2004/1/26


There are two files that need editing, both are located in the template directory, they are xdir_listingfull.html & xdir_link.html


    form>


<
form name="search" method="get" action="http://www.multimap.com/map/places.cgi" target="_new" >
<
input type="hidden" name="client" value="public" />
<
input type="hidden" name="lang" value="" />
<
input type="hidden" name="advanced" value="" />
<
input type="hidden" name="quicksearch" id="qs" value="<{$link.zip}>" />
<
input type=submit name="submit" value="Map" />
form>


Don't forget to update the module in XOOPS admin. Your maps will now appear in Multimap.
Might be nice to add the feature for registered users to be given the map and directions of how to get there from their own address, using the postcode to postcode form in Multimap.

3
fredski
Re: Xdirectory, code for UK maps
  • 2004/7/21 9:59

  • fredski

  • Quite a regular

  • Posts: 265

  • Since: 2004/1/26


Ok first of all I've now added the spaw module found HERE But I have a problem, heres what I've done...........

In the admin directory for Xdirectory I've modified index.php as the following

added
//Insert spaw start
$module_handler = &xoops_gethandler('module');
$module = &$module_handler->getByDirname('spaw');

if (
is_object($module) && $module->getVar('isactive'))
{
    include_once 
XOOPS_ROOT_PATH "/modules/spaw/spaw_control.class.php";
}
//insert spaw finish

on line 38 after include '../include/functions.php';

commented out
// editied out echo ""._MD_DESCRIPTIONC."n";
        //edited out xoopsCodeTarea("description",60,8);
        //edited out xoopsSmilies("description");
        //echo "n";

on lines 268 - 271, and inserted
echo "

"._MD_DESCRIPTIONC."n";
//xoopsCodeTarea("description", 60, 15);
$sw = new SPAW_Wysiwyg'description'$link.description'en''full''default''99%''600px' );
$sw -> show();
xoopsSmilies("description");



same again on lines 377 - 380
//edited out echo ""._MD_DESCRIPTIONC."";
    //edited out xoopsCodeTarea("description",60,8);
    //edited out xoopsSmilies("description");

and inserted
echo "

"._MD_DESCRIPTIONC."n";
//xoopsCodeTarea("description", 60, 15);
$sw = new SPAW_Wysiwyg'description'$link.description'en''full''default''99%''600px' );
$sw -> show();
xoopsSmilies("description");



Although spaw now shows up when modifying the listing and it looks ok in the design view, when I actualy update the listing and go to view the page, it shows up as html text where am I going wrong????????????

4
fredski
Ok Need help now, I'm sinking fast
  • 2004/7/21 11:56

  • fredski

  • Quite a regular

  • Posts: 265

  • Since: 2004/1/26


Ok, The help file say's
Quote:
Spaw WYSIWYG Editor V1.20b RC1
This module is very easy to use and has been set up in such a way that you only need to add a few lines
to any module and it will be up and running in no time.


It lies...........

It also says
Quote:
Also, you will have to change the way modules display the data, as XOOPS auto converts linebreaks to
and this
will effect the way your news story is displayed in the news module (this applies for all other modules as well. The
only way to control to aviod this is to 'tell' XOOPS not to convert linespaces.

example: News module.

Open class/xoopsstory.php and around line 312: Change this line:

case "Show":

$hometext = $myts->makeTareaData4Show($this->hometext,$html,$smiley,$xcodes);

To:

$hometext = $myts->makeTareaData4Show(trim($this->hometext), 1, $smiley, $xcodes, 1, 0);

You will also have to change the case "edit" to:

case "Edit":
$hometext = $myts->makeTareaData4Edit($this->hometext, 1, 0, 0, 0, 0);

With Switch 2 (The one after trim($this->hometext)) we are saying use html while displaying the news story and the last switch
will stop the line conversion in xoops.


Xdirectory dosn't have a Class folder so how do I tell the module to display the data the way I want it???

Can someone please help me with this, theres a lot of people reading this thread but not posting

5
builderb
Re: Ok Need help now, I'm sinking fast
  • 2004/7/21 15:18

  • builderb

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/8/4 2


I believe the file that handles text formating is located here:

/class/module.textsanitizer.php

Let me know how it works out.

-builderb


6
fredski
Re: Ok Need help now, I'm sinking fast
  • 2004/7/22 6:58

  • fredski

  • Quite a regular

  • Posts: 265

  • Since: 2004/1/26


I wish that was the case Builderb, but as I said in my previous post, my version of Xdirectory dosen't have a class folder, ergo no class files. Unless you know of an xdirectory that I can get my hands on that does have one??
I'm using version 1.5 which I think is the latest release.

Come on guys and gals, there must be someone on here that has twiddled and tweaked this module.

7
Mithrandir
Re: Ok Need help now, I'm sinking fast

xDirectory is really a bad example for messing about with

Too many files fetching the same information in the database for show (index.php, viewcat.php, singlelink.php) not to mention that it uses a Smarty template for the submit form and not the XoopsForm classes. Quite a big task to put something like Spaw in there.

8
fredski
Re: First Hack Module
  • 2004/7/23 12:32

  • fredski

  • Quite a regular

  • Posts: 265

  • Since: 2004/1/26


Im putting the link to the module for download here, Franchise Module.zip I've not put the spaw in yet but I've added some new fields and changed the layout of the display pages to display the new fields etc. I'm struggling getting the data into my database though, I cant see any errors when submitting and it creates a new entry, only I get missing fields. could someone have a look and see what I'm doing wrong. :) Please :) This is my first attempt at something more than just messing with themes and following other peoples hack instructions. so any help would be much appreciated.
The layout I'm trying to achieve is:-

Normal Listings

Resized Image

Company Profile Page

Resized Image

with the map buttons, tell a friend, email at the bottom

Hope someone else likes this idea (someone with a bit more php knowlage than me ) that can help out

9
fredski
Re: First Hack Module
  • 2004/7/27 8:16

  • fredski

  • Quite a regular

  • Posts: 265

  • Since: 2004/1/26


.~Bump~.

10
Ruddle
Re: Ok Need help now, I'm sinking fast
  • 2004/8/16 13:56

  • Ruddle

  • Just popping in

  • Posts: 61

  • Since: 2003/11/10


I have been trying to add this in the default news module but am experience the same html display when editing an existing news story. I can direct you to the class/xoopsstory.php. After much searching it is off Xoops's root directory. I edited it but it dodn't solve the html problem.

Login

Who's Online

135 user(s) are online (123 user(s) are browsing Support Forums)


Members: 0


Guests: 135


more...

Donat-O-Meter

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

Latest GitHub Commits