Link Directory (LD) [Deleted]

@au lait

Can the trending links be defined as most replies + most likes in X days?

For example, if one link has five forum comments vs another link that has 26 likes - which one should be trending? Not everyone likes to comment, but they will like something because it's quick and easy.

I want to really bring the most popular content to the front.

How can I set trending links as the homepage? I have new links as homepage now, but it looks bad when they have no likes or comments.

Any input about opening links in the frame with some social and browsing options like stumble upon?
 
and does not show "full titles" as in the LD Sidebar (LD Home).

I guess it does not show the "full titles" because the Sidebar-width in the "Link-Directory" is 220px versus the Sidebar-width in the "Forum" is 250px
You would need to adjust the width of the left-Sidebar in the LD towards 250px, if you want to have the same appearance.


Unfortunately, the default XenForo-Sidebar in the RM is smaller than the Sidebar in the Forums.
https://xenforo.com/community/threads/rm-make-width-of-left-sidebar-bigger.110300/
 
I guess it does not show the "full titles" because the Sidebar-width in the "Link-Directory" is 220px versus the Sidebar-width in the "Forum" is 250px
You would need to adjust the width of the left-Sidebar in the LD towards 250px, if you want to have the same appearance.

The width does not have any effect on whether it is displayed or not. It is most likely a "conditional" problem or something missing.
Checking with the browser inspector, in XF Sidebar on forum home, the "<div class="additionalRow muted">" is missing. In that div you will find the link description (which is missing in my screenshot example).
 
The width does not have any effect on whether it is displayed or not. It is most likely a "conditional" problem or something missing.
Checking with the browser inspector, in XF Sidebar on forum home, the "<div class="additionalRow muted">" is missing. In that div you will find the link description (which is missing in my screenshot example).

I am not talking about the "missing description".
I am talking about the other point you have mentioned about "full titles".
 
I am not talking about the "missing description".
I am talking about the other point you have mentioned about "full titles".

It's the same. The Sidebar Width does not influence if the full title is shown or not – since the width is managed by the CSS but the condition if it is there or not is managed in the HTML template.

Seeing the HTML template, it seems that the conditional of the following is not working in the forum index sidebar as it should. This can be a variable problem:

Code:
<xen:if is="(!{$xenOptions.ld_xfSidebarShowImages} && {$ld_xfSidebar}) || (!{$xenOptions.ld_ldSidebarShowFullTitle} && {$ld_ldSidebar})">
            <div class="additionalRow muted">
                {$link.pagetext}
            </div>
        </xen:if>

The following is not rendered at all. So the CSS (respectively the Sidebar Width) has no influence on it.
Code:
<div class="additionalRow muted">
                {$link.pagetext}
            </div>

So something must be wrong here, in regard of the use on forum index.
Code:
<xen:if is="(!{$xenOptions.ld_xfSidebarShowImages} && {$ld_xfSidebar}) || (!{$xenOptions.ld_ldSidebarShowFullTitle} && {$ld_ldSidebar})">
 
Since upgrading to 2.6 I've been getting a ton of these errors

ErrorException: Undefined index: ld_no_tags - library/phc/LinkDirectory/Model/Links.php:999
Generated By: Shyan, 42 minutes ago
Stack Trace
#0 /home/physicsf/public_html/library/phc/LinkDirectory/Model/Links.php(999): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/physicsf/...', 999, Array)
#1 /home/physicsf/public_html/library/phc/LinkDirectory/Model/Links.php(1245): phc_LinkDirectory_Model_Links->canEditTags(Array)
#2 /home/physicsf/public_html/library/phc/LinkDirectory/Model/Links.php(1193): phc_LinkDirectory_Model_Links->_getUserLinkRights(Array)
#3 /home/physicsf/public_html/library/phc/LinkDirectory/Search/DataHandler/Links.php(113): phc_LinkDirectory_Model_Links->_prepareLinks(Array)
#4 /home/physicsf/public_html/library/Tapatalk/Model/Search.php(18): phc_LinkDirectory_Search_DataHandler_Links->getDataForResults(Array, Array, Array)
#5 /home/physicsf/public_html/library/XenForo/Model/Search.php(359): Tapatalk_Model_Search->getViewableSearchResultData(Array, Array, true, NULL)
#6 /home/physicsf/public_html/library/XenForo/ControllerPublic/Search.php(444): XenForo_Model_Search->getSearchResultsForDisplay(Array)
#7 /home/physicsf/public_html/library/XenForo/FrontController.php(351): XenForo_ControllerPublic_Search->actionResults()
#8 /home/physicsf/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/physicsf/public_html/index.php(13): XenForo_FrontController->run()
#10 {main}
Request State
array(3) {
["url"] => string(45) "https://www.physicsforums.com/search/2738489/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Can the trending links be defined as most replies + most likes in X days?

I think any trending calculation should incorporate all methods of user interaction - discussion, likes, clicks, edited/added, bookmarks.


it is important to differentiate between "Trending Links" and "Top Links":

- "Trending Links" are mostly taking "communication-related activities" into account, which consist of: "Forum-Posts" / "Latest Posts".
- "Top Links" will mostly taking all sorts of "voting-related activities" into account, which consist of: "Star-Ratings", "Number of Likes", "Number of Clicks", "Number of Bookmarks", etc.

There is a reason why there are "TOP Links".

:)
 
it is important to differentiate between "Trending Links" and "Top Links":

- "Trending Links" are mostly taking "communication-related activities" into account, which consist of: "Forum-Posts" / "Latest Posts".
- "Top Links" will mostly taking all sorts of "voting-related activities" into account, which consist of: "Star-Ratings", "Number of Likes", "Number of Clicks", "Number of Bookmarks", etc.

There is a reason why there are "TOP Links".

:)

Trending would be what's hot "now" or "today" or "last 48 hours" kind of thing. (Use Twitter as example).

Top links suggests the most clicked, or most commented, overall. (best links ever).

If we put the top links as our homepage, then the links may not change over enough for the users to enjoy them. We might see the same top links for a number of days/weeks before something else catches up.

If we can make trending links (based on # of likes + # of comments in 24-48 hours), then our homepage will always update on it's own, showing the best links available. I didn't include ratings in this because I don't use ratings. I think using BOTH ratings and likes is very repetitive and there's no need to have both. One or the other is sufficient. Look at Reddit's homepage - updates on it's own every day with the top/trending links. :)

If top links can do that - that's cool. I just don't want to be stuck with a screen of links that doesn't ever change, or doesn't change daily. That wouldn't provide a good experience to the users.
 
update - thank you very much @erich37 for pointing out the sort by trending links option in the admin!

Homepage now shows trending links and no links without comments. Looks a LOT better for the users :)

THANKS!!!
 
update - thank you very much @erich37 for pointing out the sort by trending links option in the admin!

Homepage now shows trending links and no links without comments. Looks a LOT better for the users :)

THANKS!!!

you are welcome. :whistle:


But you should not send your "thanks" to myself, but rather to @au lait who is the genius who coded all that stuff.

:)
 
Updated script.

Added new links. Links went through perfectly fine, but got the following server error each time.

Is there anything specific in the new settings I may have missed?

Code:
ErrorException: Undefined variable: tagger - library/phc/LinkDirectory/ControllerPublic/Links.php:459

Stack Trace

#0 /home/public_html/mysite/library/phc/LinkDirectory/ControllerPublic/Links.php(459): XenForo_Application::handlePhpError(8, 'Undefined varia...', '/home/...', 459, Array)
#1 /home/public_html/mysite/library/XenForo/FrontController.php(351): phc_LinkDirectory_ControllerPublic_Links->actionEdit()
#2 /home/public_html/mysite/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#3 /home/public_html/mysite/index.php(13): XenForo_FrontController->run()
#4 {main}

Request State

array(3) {
  ["url"] => string(45) "https://www.mysite.com/links/link/edit"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(11) {
    ["ld_cat_id"] => string(1) "6"
    ["url"] => string(67) "http://www.newser.com/story/222667/pushy-parents-ruin-egg-hunt.html"
    ["affiliate_url"] => string(0) ""
    ["title"] => string(51) "Parents turn Easter Egg hunt into disastrous Battle"
    ["pagetext"] => string(49) "And people wonder why you can't have nice things?"
    ["logo_file_type"] => string(7) "ogimage"
    ["_xfToken"] => string(8) "********"
    ["ld_id"] => string(0) ""
    ["newFileName"] => string(0) ""
    ["_xfConfirm"] => string(1) "1"
    ["inlineAdd"] => string(1) "0"
  }
}
 
Trending would be what's hot "now" or "today" or "last 48 hours" kind of thing. (Use Twitter as example).

Top links suggests the most clicked, or most commented, overall. (best links ever).

If we put the top links as our homepage, then the links may not change over enough for the users to enjoy them. We might see the same top links for a number of days/weeks before something else catches up.

If we can make trending links (based on # of likes + # of comments in 24-48 hours), then our homepage will always update on it's own, showing the best links available. I didn't include ratings in this because I don't use ratings. I think using BOTH ratings and likes is very repetitive and there's no need to have both. One or the other is sufficient. Look at Reddit's homepage - updates on it's own every day with the top/trending links. :)

If top links can do that - that's cool. I just don't want to be stuck with a screen of links that doesn't ever change, or doesn't change daily. That wouldn't provide a good experience to the users.

the concept is clearly understood.

I would suggest that you turn the "Star-Ratings" on.
Using both "Star-Ratings" and "Likes" are not redundant, but complement each other.
Just look at the Resource-Manager here at XenForo.
 
The resource manager and what I'm doing aren't even remotely the same. One sells/promotes products that should be reviewed for quality, while my site posts random news links that don't need any ratings whatsoever - a simple like or dislike is all I need.

Some people need it, some people don't. That's why it's great that it's optional and we can chose what works best for our site, since not everyone uses this in the same way.
 
Last edited:
Suggestions:

1.
Ability to change link list title size/color and description size/color in style properties.

2.
Ability to hide categories so they don't appear on the sidebar or top bar? I don't need the categories to be displayed in the sidebar or the top.

- can we move the category to the info line under the list link item? Perhaps next to "Make VIP" - sort of a very small byline that takes up very little room? Also, if you display the category in your link info, then it's not always needed a second time up top. The top category menu takes up a LOT of space, so I'd like to hide that for now until a smaller version is available.

- I'd like to see a simplified link list up top or a drop down for categories next to the filter.

- Add ability to hide the filter button. I don't use any prefixes, so my filter drop down is always empty.

3.
Make the permalink more friendly. It doesn't make sense to appear as a number. I know the default XF system does that too, and that's quite pointless as well.
I changed mine to say "Share this" because the common user isn't going to know what the number is or what it does. I didn't even know until I clicked on it.

- when you click on the permalink url, it has options to copy/paste the links. That's awesome, but should we also consider adding our own "share this" or "addthis" buttons? This could help our links get some traffic via social media. May as well see if we can get some social traffic, right?

Thanks!

Here's what I added to the ld_controls template to change the permalink number and place my category/username under the link description. It gives it more space and almost looks like a blog entry.

Use at your own risk and change the text to match your own needs so we don't have exactly the same thing.

Code:
 <a href="{xen:link full:linkdirectory/link/open, $link}" title="{xen:phrase permalink}" class="item muted hashPermalink OverlayTrigger" data-href="{xen:link linkdirectory/link/permalink, $link}">Share it?</a>

See more <a href="{xen:link linkdirectory/categories, $link.category}">{$link.category.title}</a>

posted by {$link.username}

I did this entirely by experiment, had no clue if it would work, but it did. Bigger titles/description, no info next to title, clean focus on comments, and a little bit of info under description. If user logs in, they see the report and make vip options.

This may not work for others, but it looks great for us.

links with less info.webp
 
This is from your Forum Index. No Page Descriptions. I tested it with different browsers. Since the template has {$link.pagetext} included I still think this is not as wanted.
Oh, I see. Agreed.
With 'Show full Title' unticked on LD Sidebar, pagetext is displayed.
With 'Show full Title' unticked on XF Sidebar, pagetext is not displayed.
XF Sidebar needs adjusting to be same as LD Sidebar - showing pagetext with 'Show full Title' unticked
 
Back
Top Bottom