Jump to content

Community

Links Directory


Adriano Faria

Recommended Posts

3 minutes ago, Adriano Faria said:

Ok, I’ll add a setting. Currently you can edit a file to allow this. Let me know if you want me to show you how to do it. 

Sure, I'd love the code.

Thanks for adding the setting. ?

Edited by Bluto
Link to comment
Share on other sites

Open applications\links\sources\Link\Link.php and find:

		$return['url'] = new \IPS\Helpers\Form\Url( 'link_url', ( $item ) ? $item->url : '', TRUE, array( 'allowedProtocols' => array( 'http', 'https' ) ), function( $val ) use ($item)
		{
			if( \IPS\Request::i()->do == 'submit' )
			{
				$count = \IPS\Db::i()->select( 'COUNT(*)', 'links_links', array( 'link_url=?', $val ) )->first();
				if ( $count )
				{
					throw new \InvalidArgumentException('link_in_use');
				}
			}
		} );

Change to:

		$return['url'] = new \IPS\Helpers\Form\Url( 'link_url', ( $item ) ? $item->url : '', TRUE, array( 'allowedProtocols' => array( 'http', 'https' ) ) );

 

@Bluto

Link to comment
Share on other sites

1 minute ago, Adriano Faria said:
 

Then starts will appear when someone is submitting a review:

wWfMWIN.png&key=bba9ec002c8c9600fc5706d0

They do now.. 

The mistake I made (if you can call it a mistake) was that I just renamed the default directory that came with Links Directory, that didn't show up any stars at all, I did have the "Allow review" thing checked, but it didn't work. I then created other directories, and they were fine, just the original one wasn't. I have it sorted now, I just deleted the original default directory, and all is well with the world. 

Thanks for your help. 

Link to comment
Share on other sites

  • 2 weeks later...

When sorting links by rating within a category view, the links with one 5-star review are displayed above links that have more than one 5-star reviews. Like this:

  • Link 1 (5 stars, 1 review)
  • Link 2 (5 stars, 4 reviews)
  • Link 3 (5 stars, 10 reviews)

I would list other way: the more reviews, the higher in the list. Is it possible to add number of reviews to the rating sorting?

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy