Link Directory (LD) [Deleted]

@au lait could you change the permissions for the link confirmation to be the opposite in logic? Because it negates the "Set All" switch logic to set all into "Allow". Must be confirmed -> Allow is not consistent to the rest.

screenshot.webp
 
More suggestions and a technical inquiry...

1) Very important: Have the Site Logo in the Link Directory be clickable with the URL from its link in addition to the Link Title.

2) Have the Sidebar include the links's logo icon (clickable of course) and the latest edit and user name (same references as in the link directory).

linkdirectory_sidebar.webp

3) Make the Block Headline clickable (just to jump to href="linkdirectory/")

4) Could you please change the helper.php $link to be the URL alone and not the entire <a href="" target="_blank"></a> tag? It makes template layout more flexible. If it would be like that, one could post links from the directory anywhere on the board. and I could have added the link to the Site Logo myself.

Thanks!
 
Can we have this:

1. require images, if no image, then reject link.
- seeing the default link image looks terrible. The people submitting can stop being lazy for two seconds.

2. I submitted my own link, from my own xenforo site, which had an image, it did not pull the image. I wonder if other xenforo sites who submit to each other will run into this problem of the images not parsing.

3. is it possible to use the prefixes we've already created for threads? Wondering because I've created 20 of those with custom CSS and would hate to have to do that again.

check software: yes or no (this is really kinda pointless for many sites.)

4. I'd like to have the site image appear for the sidebar too - or at least have the option for it. It would definitely get more clicks.

5. I'm not sure your click tracking is working. I've had links on for a few days that still have 0-1 and ONLY increase if I click on it myself. With 5000-8000 visitors, it's impossible to not get clicks, especially since the placement is very high and links are viewed by guests.

6. Require reciprocal link yes/no. We can use this to gain back links to our site. We can also permit paid members or trusted partners to bypass the recip link and submit without restrictions.
 
Last edited:
Is it possible to fetch the logo / screenshot automatically? Or let a 3th. party make them and upload them.
I Have a lot of links, If I have to do it one by one it's going to take for ages. That would be a nice feature.
 
Is it possible to fetch the logo / screenshot automatically? Or let a 3th. party make them and upload them.
I Have a lot of links, If I have to do it one by one it's going to take for ages. That would be a nice feature.

It is implemented. It fetches OpenGraph information as well as browser icons.
 
would be great to have:

- Prefixes
- XenForo Keyword-Tags
- Grid-View Layout
- automatically generate a Website-Screenshot for the photo-image (optional)
View attachment 123449
I'll see;)

SOLVED. Maybe the default should be to remove the XenForo text from the Software Check. or write a better hint/documentation... ;)
Ok I am improving!

@au lait could you change the permissions for the link confirmation to be the opposite in logic? Because it negates the "Set All" switch logic to set all into "Allow". Must be confirmed -> Allow is not consistent to the rest.
View attachment 123622
Ok I am improving!

More suggestions and a technical inquiry...

1) Very important: Have the Site Logo in the Link Directory be clickable with the URL from its link in addition to the Link Title.

2) Have the Sidebar include the links's logo icon (clickable of course) and the latest edit and user name (same references as in the link directory).

3) Make the Block Headline clickable (just to jump to href="linkdirectory/")

4) Could you please change the helper.php $link to be the URL alone and not the entire <a href="" target="_blank"></a> tag? It makes template layout more flexible. If it would be like that, one could post links from the directory anywhere on the board. and I could have added the link to the Site Logo myself.

Thanks!
I'll see;)

Can we have this:

1. require images, if no image, then reject link.
- seeing the default link image looks terrible. The people submitting can stop being lazy for two seconds.

2. I submitted my own link, from my own xenforo site, which had an image, it did not pull the image. I wonder if other xenforo sites who submit to each other will run into this problem of the images not parsing.

3. is it possible to use the prefixes we've already created for threads? Wondering because I've created 20 of those with custom CSS and would hate to have to do that again.

check software: yes or no (this is really kinda pointless for many sites.)

4. I'd like to have the site image appear for the sidebar too - or at least have the option for it. It would definitely get more clicks.

5. I'm not sure your click tracking is working. I've had links on for a few days that still have 0-1 and ONLY increase if I click on it myself. With 5000-8000 visitors, it's impossible to not get clicks, especially since the placement is very high and links are viewed by guests.

6. Require reciprocal link yes/no. We can use this to gain back links to our site. We can also permit paid members or trusted partners to bypass the recip link and submit without restrictions.
I'll see;)


I was on vacation! I'll the day time start some implement!

Thank you all!
 
This worked great for me :)

Step 1 (Import the Categories):
Code:
insert into phc_linkdirectory_categories (ld_cat_id, title, pagetext, parent_ld_cat_id, lft, depth) select node_id, title, description, parent_node_id, lft, depth from sf_xenkingdir_directory_node;

Step 2 (Import the Directory records):
Code:
insert into phc_linkdirectory (user_id, ld_cat_id, url, title, pagetext, dateline, thread_id) select t.user_id, d.directory_category, d.website_url, t.title, p.message, t.post_date, t.thread_id from xf_thread as t inner join sf_xenkingdir_thread_map as d on d.thread_id = t.thread_id inner join xf_post as p on t.first_post_id = p.post_id where t.discussion_state = 'visible' and d.website_url <> '' and t.node_id = 3;
..... replacing the number 3 on the end with the number of your 'Directory Forum' node id from /admin.php?options/list/XenKingDir

Step 3 (calc the categories link count):
Code:
update phc_linkdirectory_categories as c set c.link_count = (select count(ld_id) from phc_linkdirectory as d where d.ld_cat_id = c.ld_cat_id);
Thanks for the SQL Queries Mouth
Do you know if there is a way to fetch the Opengraph images?
 
Do you know if there is a way to fetch the Opengraph images?
What a great idea. I'm sure there's a way, with a simple php script to retrieve and insert into the DB.
Would be an awesome /admin.php?tools/ or cron entry for @au lait to add to this add-on.
Alternatively, @au lait could let us know where the og image is stored in the DB, and we could research ourselves.
 
@au lait

It would be nice if we had something to rebuild the Opengraph data (A logo can change)
Because I imported a lot of links with Mouth his SQL queries, but it doesn't fetch the Opengraph images.
That would also fix this.

Also after editing a url it always sends me to
example.com/linkdirectory/own
Can you change this so we end up back on the same page where we where editing links?

Thanks :)
 
Last edited:
Suggestions:
  • Add google maps field beside url, title...
  • Set a cron for updating Link directory, cause link directory counter is not updated by itself (I have to do it by myself in ACP - rebuild category counts)
  • Add an option to set in ACP sorting default list by Admin order (I want to some category is listed by default when user open Link Directory
  • Custom fields?
  • widget with random links from link directory
  • ...
 
Btw, server error:

Code:
Server Error Log
Error Info
ErrorException: Trying to get property of non-object - library/phc/LinkDirectory/Helper/Helper.php:316
Generated By: Sunka, 17 minutes ago
Stack Trace

#0 /home/nginx/domains/pijanitvor.com/public/library/phc/LinkDirectory/Helper/Helper.php(316): XenForo_Application::handlePhpError(8, 'Trying to get p...', '/home/nginx/dom...', 316, Array)
#1 /home/nginx/domains/pijanitvor.com/public/library/phc/LinkDirectory/ControllerPublic/Links.php(173): phc_LinkDirectory_Helper_Helper::getPageInfos('EbitCMS sustav ...', Array)
#2 /home/nginx/domains/pijanitvor.com/public/library/XenForo/FrontController.php(351): phc_LinkDirectory_ControllerPublic_Links->actionEdit()
#3 /home/nginx/domains/pijanitvor.com/public/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 /home/nginx/domains/pijanitvor.com/public/index.php(13): XenForo_FrontController->run()
#5 {main}

Request State

array(3) {
  ["url"] => string(65) "https://www.pijanitvor.com/linkdirectory/link/bbs-web-shop.7/edit"
  ["_GET"] => array(1) {
    ["/linkdirectory/link/bbs-web-shop_7/edit"] => string(0) ""
  }
  ["_POST"] => array(10) {
    ["username"] => string(5) "Sunka"
    ["userid"] => string(1) "1"
    ["ld_cat_id"] => string(1) "3"
    ["url"] => string(52) "http://www.ribolovnipribor.hr/hrvatski/naslovnica_1/"
    ["title"] => string(33) "Fishermans partner BBS - web shop"
    ["pagetext"] => string(61) "Web shop stranica ribolovnog dućana BBS - Fishermans partner"
    ["_xfToken"] => string(8) "********"
    ["ld_id"] => string(1) "7"
    ["newPicId"] => string(0) ""
    ["_xfConfirm"] => string(1) "1"
  }
}
 
And here are my server errors
Code:
Server Error Log
Error Info
ErrorException: Undefined index: scheme - library/XenForo/Helper/Http.php:35
Generated By: Fred., 7 minutes ago
Stack Trace
#0 /home/admin/domains/example.com/private_html/library/XenForo/Helper/Http.php(35): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/admin/dom...', 35, Array)
#1 /home/admin/domains/example.com/private_html/library/XenForo/Helper/Http.php(18): XenForo_Helper_Http::getExtraHttpClientOptions('//cdn0.agoda.ne...')
#2 /home/admin/domains/example.com/private_html/library/phc/LinkDirectory/Helper/Helper.php(358): XenForo_Helper_Http::getClient('//cdn0.agoda.ne...')
#3 /home/admin/domains/example.com/private_html/library/phc/LinkDirectory/ControllerPublic/Links.php(177): phc_LinkDirectory_Helper_Helper::sitePicUpload(false, '', 45, Array, Array, '//cdn0.agoda.ne...')
#4 /home/admin/domains/example.com/private_html/library/XenForo/FrontController.php(351): phc_LinkDirectory_ControllerPublic_Links->actionEdit()
#5 /home/admin/domains/example.com/private_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#6 /home/admin/domains/example.com/private_html/index.php(13): XenForo_FrontController->run()
#7 {main}
Request State
array(3) {
  ["url"] => string(59) "https://www.example.com/linkdirectory/link/agoda.45/edit"
  ["_GET"] => array(1) {
    ["/linkdirectory/link/agoda_45/edit"] => string(0) ""
  }
  ["_POST"] => array(10) {
    ["username"] => string(5) "Gecko"
    ["userid"] => string(4) "5574"
    ["ld_cat_id"] => string(3) "230"
    ["url"] => string(20) "http://www.agoda.com"
    ["title"] => string(5) "Agoda"
    ["pagetext"] => string(145) "Smarter hotel booking, book now and pay later !

Five great reasons to book with us :
* Over 357,000 hotels worldwide – more added every da"
    ["_xfToken"] => string(8) "********"
    ["ld_id"] => string(2) "45"
    ["newPicId"] => string(0) ""
    ["_xfConfirm"] => string(1) "1"
  }
}
and
Code:
Server Error Log
Error Info
ErrorException: Trying to get property of non-object - library/phc/LinkDirectory/Helper/Helper.php:316
Generated By: Fred., 12 minutes ago
Stack Trace
#0 /home/admin/domains/example.com/private_html/library/phc/LinkDirectory/Helper/Helper.php(316): XenForo_Application::handlePhpError(8, 'Trying to get p...', '/home/admin/dom...', 316, Array)
#1 /home/admin/domains/example.com/private_html/library/phc/LinkDirectory/ControllerPublic/Links.php(173): phc_LinkDirectory_Helper_Helper::getPageInfos('<html>\r\n<head>\r...', Array)
#2 /home/admin/domains/example.com/private_html/library/XenForo/FrontController.php(351): phc_LinkDirectory_ControllerPublic_Links->actionEdit()
#3 /home/admin/domains/example.com/private_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#4 /home/admin/domains/example.com/private_html/index.php(13): XenForo_FrontController->run()
#5 {main}
Request State
array(3) {
  ["url"] => string(60) "https://www.example.com/linkdirectory/link/servas.20/edit"
  ["_GET"] => array(1) {
    ["/linkdirectory/link/servas_20/edit"] => string(0) ""
  }
  ["_POST"] => array(10) {
    ["username"] => string(5) "Gecko"
    ["userid"] => string(4) "5574"
    ["ld_cat_id"] => string(3) "260"
    ["url"] => string(25) "http://joomla.servas.org/"
    ["title"] => string(6) "Servas"
    ["pagetext"] => string(141) ""Hospitality Exchange" is the best way to save on accommodation, not having to pay for it.
This way connect travelers with locals; it's not "
    ["_xfToken"] => string(8) "********"
    ["ld_id"] => string(2) "20"
    ["newPicId"] => string(0) ""
    ["_xfConfirm"] => string(1) "1"
  }
}

and

Code:
Server Error Log
Error Info
ErrorException: Undefined offset: 1 - library/phc/LinkDirectory/Helper/Helper.php:62
Generated By: Unknown Account, Today at 1:14 PM
Stack Trace
#0 /home/admin/domains/example.com/private_html/library/phc/LinkDirectory/Helper/Helper.php(62): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/home/admin/dom...', 62, Array)
#1 /home/admin/domains/example.com/private_html/library/phc/LinkDirectory/Helper/Helper.php(111): phc_LinkDirectory_Helper_Helper::getPageData('http://www.stat...')
#2 /home/admin/domains/example.com/private_html/library/phc/LinkDirectory/CronEntry/LDCron.php(67): phc_LinkDirectory_Helper_Helper::checkURL('http://www.stat...', 241, false, -1)
#3 /home/admin/domains/example.com/private_html/library/XenForo/Model/Cron.php(355): phc_LinkDirectory_CronEntry_LDCron::runLinksCheck(Array)
#4 /home/admin/domains/example.com/private_html/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#5 /home/admin/domains/example.com/private_html/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_Cron->execute(Array, Array, 8, '')
#6 /home/admin/domains/example.com/private_html/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 8, '', false)
#7 /home/admin/domains/example.com/private_html/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, 8, '', false)
#8 /home/admin/domains/example.com/private_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#9 {main}
Request State
array(3) {
  ["url"] => string(39) "https://www.example.com/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(3) {
    ["_xfRequestUri"] => string(47) "/threads/cel-vol-toeristen-la-paz-bolivie.7301/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Last edited:
Server Error when visiting the page "Likes you received" (/account/likes)

Code:
Argument 1 passed to phc_LinkDirectory_Model_LD::getAlertsByLdIds() must be of the type array, null given, called in /var/www/clients/client180/web812/web/library/phc/LinkDirectory/LikeHandler/Links.php on line 21 and defined

XenForo_Application::handlePhpError() in phc/LinkDirectory/Model/LD.php at line 433
phc_LinkDirectory_Model_LD->getAlertsByLdIds() in phc/LinkDirectory/LikeHandler/Links.php at line 21
phc_LinkDirectory_LikeHandler_Links->getContentData() in XenForo/Model/Like.php at line 457
XenForo_Model_Like->addContentDataToLikes() in XenForo/ControllerPublic/Account.php at line 1729
XenForo_ControllerPublic_Account->actionLikes() in XenForo/FrontController.php at line 351
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /var/www/clients/client180/web812/web/index.php at line 13
 
Also, I can not understand some options in ACP.
For example:
Check software (in category) - Even if I read description, I can not understand what is this
Check software (in options) - same as above

And I have two catgories with same options but different names, and in one category one link (url) is not valid, but same structure of different url is valid (http://www.example.com is valid, and http://example-two.com is not valid).

It is frustrating.
 
Two quick requests that would be amazing...and should be optional for anyone who doesn't like them.

1. Outgoing links should be redirected using our own domain.
2. Outgoing links open in a small frame that has a like button, link to our homepage, and social share link.

Explanations

1
My site is MyCoolSite.com.

User submits MyCoolCar.com/blah.html

Normally, when you mouseover it, it will show MyCoolCar.com/blah.html and go directly to MyCoolCar.com/blah.html

I would prefer if the link looked like this on our site: MyCoolSite.com/go/1 and next link is MyCoolSite.com/go/2 and each link gets a number. That may appear as internal content which generally looks better than linking out. Even if it redirects in the end, the SE's MAY like it better.

2
A small 10-30 high pixel iframe going across the top of the window with a text homepage link, like button, social share button, and close frame link.

If anyone shares the URL, they share OUR url, which is MyCoolSite.com/go/1. It gives us a small traffic and stats boost and possibly gains a new user while also giving the other person the benefit of traffic.

I've seen both in action on very large sites and they work great.
 
What a great idea. I'm sure there's a way, with a simple php script to retrieve and insert into the DB.
Would be an awesome /admin.php?tools/ or cron entry for @au lait to add to this add-on.
Alternatively, @au lait could let us know where the og image is stored in the DB, and we could research ourselves.

Table "phc_linkdirectory" field "site_logo" is a timesstamp
Images are saved on "data\linkdirectory"
Scheme:
LD_ID divided 1000 (Round fractions down) = Foldername
Image has the the LD_ID.jpg

Thank you for all error messages! Have that all fixed!


New version comes today
 
@au lait

The white box behind every link I find it ugly (/styles/phc/linkdirectory/apps/none16.png)
Is there a way to remove it if it can't find the software? Or can you make it transparent or something so it looks better?

Thanks! :)
 
Top Bottom