Resource icon

[SurreyForum] XenKingDir: Link / Business Directory (Directory) 1.2.0.8

No permission to download
input 90+ categories

For the actual categories, it shouldn't take long to drop them from sf_xenkingdir_directory_node. But to create your own directory catagory can take a while if it's a large directory
so you might want to look at the install file:

XenKingDir\Install.php

and change the function on line 146:

INSERT IGNORE INTO `sf_xenkingdir_directory_node`

modify it to your custom categories (if it's easier / quicker than manually doing this)

so that something like

(106,'Search Engine Optimisation','', NULL,'Directory',46,100,1,108,109,1,0,0),
represents:
(node_id,title,<ignore>, <NULL>,node_type_id,parent_node_id,display_order,display_in_list,lft,rgt,depth,<ignore>,<ignore>
 
Filters are probably more useful for populated lists, so this category is probably a better example:
http://www.surreyforum.co.uk/directory/indian-restaurants.272

t it possible to let the main directory left menu stay

I'm not sure what you mean by this, but the categories on the left container arent affected by the filter.


However, it sounds like you would like the filter "drop down" to always be available. That's not a bad idea (and was suggested by my other half), so I'll look into this as an option
 
However, it sounds like you would like the filter "drop down" to always be available. That's not a bad idea (and was suggested by my other half), so I'll look into this as an option
n
Yes, the page says "The requested page could not be found, Error", but it is no error that there is no entries with that field. If below the filter option it could say: There is no entries with that field", that would be top notch:cool:
 
For that example, this is with the filter returning no results:
http://www.surreyforum.co.uk/directory/cleaning-services.86/?t=addlestone&prefix_id=246
This is with the filter returning some results:
http://www.surreyforum.co.uk/directory/cleaning-services.86/?t=surrey&prefix_id=296
and this is without the filter:
http://www.surreyforum.co.uk/directory/cleaning-services.86/

I don't see the error

You should be able to provide the url (since the filter persists), but I havent seen it yet...
There error that you see, is it on the page or the error logs?


Ah wait, I've just found it, it's an IE only issue (no error with FF or chrome), I'll look into fixing that
 
There will be various directories (the reply to the above was for a custom directory, which would be hard to support), if there are popular directories with multiple people requesting an import mechanism for a give directory type, I'll look into writting something, but I can't write a mechanism for each individual person, so I've provided the info above to help you figure out the SQL required to import

Thanks for the info.

I used a simple export/import (with a very mild tweak) to do the categories as they closely aligned.

Here is what I used to import my ~1,000 entries .....

Code:
DROP PROCEDURE IF EXISTS InsertIntoDirectory;
 
delimiter //
 
CREATE PROCEDURE InsertIntoDirectory()
BEGIN
 
DECLARE ld_cat_id, last_insert INT;
DECLARE ld_url, ld_name CHAR(255);
DECLARE ld_description TEXT;
DECLARE ld_date DATETIME;
 
DECLARE done BOOLEAN DEFAULT 0;
 
DECLARE ld CURSOR FOR SELECT cat_id, url, name, description, date FROM ld_urls;
 
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done=1;
 
OPEN ld;
REPEAT
FETCH ld INTO ld_cat_id, ld_url, ld_name, ld_description, ld_date;
 
IF INSTR(ld_name, '&quot;')
    THEN SET ld_name = REPLACE(ld_name, '&quot;','"');
END IF;
IF INSTR(ld_description, '&quot;')
    THEN SET ld_description = REPLACE(ld_description, '&quot;','"');
END IF;
IF INSTR(ld_name, '&apos;')
    THEN SET ld_name = REPLACE(ld_name, '&apos;','\'');
END IF;
IF INSTR(ld_description, '&apos;')
    THEN SET ld_description = REPLACE(ld_description, '&apos;','\'');
END IF;
IF INSTR(ld_name, '&amp;')
    THEN SET ld_name = REPLACE(ld_name, '&amp;','&');
END IF;
IF INSTR(ld_description, '&amp;')
    THEN SET ld_description = REPLACE(ld_description, '&amp;','&');
END IF;
IF INSTR(ld_name, '&#039;')
    THEN SET ld_name = REPLACE(ld_name, '&#039;','\'');
END IF;
IF INSTR(ld_description, '&#039;')
    THEN SET ld_description = REPLACE(ld_description, '&#039;','\'');
END IF;
 
 
INSERT INTO xf_thread (node_id, title, user_id, username, post_date) VALUES (3, ld_name, 1, 'xenforo', Unix_Timestamp(ld_date));
 
SET last_insert = LAST_INSERT_ID();
 
INSERT INTO xf_post (thread_id, user_id, username, post_date, message) VALUES (last_insert, 1, 'xenforo', Unix_Timestamp(ld_date), ld_description);
 
INSERT INTO sf_xenkingdir_thread_map (directory_category, thread_id, website_url, is_claimable) VALUES (ld_cat_id, last_insert, ld_url, 1);
 
SET last_insert = NULL;
 
UNTIL done END REPEAT;
CLOSE ld;
 
END;
//
 
delimiter ;
 
CALL InsertIntoDirectory();

The only problem I see is that when I click the 'Edit Details' or 'Add/Modify Categories' I get an error message of "The requested post could not be found". Any thoughts on how to correct this?
 
The only problem I see is that when I click the 'Edit Details' or 'Add/Modify Categories' I get an error message of "The requested post could not be found". Any thoughts on how to correct this?


Nevermind ....

Admin | Tools | Rebuild Caches | Rebuild Thread Information

All fixed :)
 
Tenants, a couple of wish list items for consideration on your todo list.
  1. The Link (containing businesses URL) should open in a new tab/windows in the browser, instead of having the user exit your site
  2. I'd like to see simple click tracking of the Link URL, and the directory entry to record and display the count of clicks.
  3. An option/function/task that will go through each directory entry and check if the link URL is still valid (eg, not giving a 404 etc.) and if not, hide/remove the entry and place into moderation queue for review and update or deletion
Also, is it my style or standard functionality, that the forum used is shown (#1 in attached screenshot) and the title is duplicated (#2 in attached screenshot). In either case, how can I remove both #1 and #2?
Thanks.Untitled.webp
 
Is there a way to automatically IMPORT all the USA States ?

The directory can go up to 5 categories deep
USA >> Texas >> Oklahoma >> Cities >> Pubs and Bars
 
Can I pay someone to do the following:

1) Make the map listing a lot smaller and place it on the right sidebar.
2) Place the Logo & Video section where the current map listing is and allow it to be just as big.
 
  • Like
Reactions: DRE
How can I have it set where the links inside each listing opens in a new tab/browser instead of taking the away from my forum?
 
Great add on!

Just a couple things I'd like to know how to do:
1) On the main forum sidebar where it shows the latest "business" listing, how can I change that heading on that sidebar block? I'm not listing businesses, I'm listing universities, and while they are technically a business it's not really the proper/best term for them.
2) How can I change the navtab from just saying "Directory" to saying "University Directory"?

Thanks!
 
Great add on!

Just a couple things I'd like to know how to do:
1) On the main forum sidebar where it shows the latest "business" listing, how can I change that heading on that sidebar block? I'm not listing businesses, I'm listing universities, and while they are technically a business it's not really the proper/best term for them.
2) How can I change the navtab from just saying "Directory" to saying "University Directory"?

Thanks!

To make it easier for you to customise, most of the phrases are defined in the xenforo phrases area... as indeed are the 2 you've mentioned

Go to the admin control panel, select Appearnace >> Phrases
Then search the phrases for:
1 {xen: phrase directory}... so search for "directory"
2 {xen: phrase sfdir_new_business_listings}... so seach for "sfdir_new_business_listings"

Then just change the text to what ever you wish ;)
 
How can I have it set where the links inside each listing opens in a new tab/browser instead of taking the away from my forum?

update the template "sfdirectory_map_view" and for each of the links add "target="_blank", for example
Code:
<a href="{$directorylisting.website_url}">
to
Code:
<a  href="{$directorylisting.website_url}" target="_blank" >

Incidentally, this is the template that you will want to modify to make your custom changes above
 
Is there a way to hide, on the directory home page only, the left sidebar listing the categories? I have all of my categories in the main section in a much more presentable manner so I don't need that sidebar there and would like to have that main section extended all the way to the left margin of the page if possible.
 
Top Bottom