Jump to content

Links Directory


Recommended Posts

Posted
3 hours ago, christopher-w said:

2/ So I disabled maps BUT link view still shows empty (random location) map even if I remove all address data. So this needs to be fixed if you can so that if maps disabled, maps are not shown.

Can you elaborate? I don't see what you're saying. If I disable Google Maps, I don't see any address in link view (I was confused with Classifieds, which shows address regardless map):

 

3 hours ago, christopher-w said:

Thanks but I've deleted information and disabled maps but it still shows the map with random location.

I can confirm this and it's fixed.

I'll give a couple of days so you can test it more then I'll release a new version.

Let me know if you want a fix for the address now.

Posted (edited)
36 minutes ago, Adriano Faria said:

Can you elaborate? I don't see what you're saying. If I disable Google Maps, I don't see any address in link view (I was confused with Classifieds, which shows address regardless map):

Sorry, bad explanation on my part.

1/ Turn on Allow link...:

image.thumb.png.7304c67af54814c1be38aaf0eb8551cc.png

 

2/ Add address

image.png.3abf59d75412dd25c1309399e7bea018.png

 

3/ It shows this but not a map

image.thumb.png.0049983a092b5dc94f3b6650c5e89f6c.png

 

4/ If I then remove address:

image.png.d9c86e2dfda98dbfe2bd47a7774eb518.png

 

5/ I still get this.

image.thumb.png.0049983a092b5dc94f3b6650c5e89f6c.png

 

6/ Even if I disable this:

image.thumb.png.8047e4cc3de17d7d11492a25a043e9be.png

 

7/ I still get this.

 

image.png.bdfd3d4c817038f00d3d81d51c6502b7.png

 

Seems like address is not cleared when I delete it in link edit and bedford in 5 and 7 is rendered immaterial of settings. 

Perhaps you fixed this?

My apologies. It has never rendered a map, my iFramely  install was doing the map rendering. When I disabled it i Framley, I never saw maps in Link Directory.

Google maps works fine elsewhere etc (Events) so...

 

am trying to delete this image below

image.png

Edited by christopher-w
Posted

Yes, there's a bug in the address field. If you don't want to wait for a new version (I will wait a couple of days to see if something else appears), then make the following edit:

- open applications\links\sources\Link\Link.php and find:

		if( isset( $values['link_location'] ) )
		{
			$this->location	= ( $values['link_location'] !== NULL ) ? json_encode( $values['link_location'] ) : NULL;
		}

Change to:

		if( $this->container()->allow_location )
		{
			$this->location	= ( $values['link_location'] !== NULL ) ? json_encode( $values['link_location'] ) : NULL;
		}

Then enabled location in the category, edit link and clear it. Save. Disable location. There's also a template edit but fix will be available in next version.

Posted
8 minutes ago, Adriano Faria said:

There's also a template edit

The following edit will make a template edit unnecessary. Same file, find:

	public function map( $width, $height )
	{
		if( $this->location )
		{
			try
			{
				return \IPS\GeoLocation::buildFromJson( $this->location )->map()->render( $width, $height );
			}
			catch( \BadMethodCallException $e ){}
		}

		return '';
	}

Change to:

	public function map( $width, $height )
	{
		if( $this->location AND $this->container()->allow_location )
		{
			try
			{
				return \IPS\GeoLocation::buildFromJson( $this->location )->map()->render( $width, $height );
			}
			catch( \BadMethodCallException $e ){}
		}

		return '';
	}

 

Fix will be available in next version.

Posted (edited)

Hello.

I am using Invision Power Board version 4.3.5, and I successfully installed the Links Directory application with no problems.  I'm able to view the links I entered when logged in as an administrator. I can also view them as a regular member,  but if I log out and view the Links Directory page as a guest I get the following error message:

Sorry, there is a problem

You do not have permission to access the Links Directoy.

Error code: 2LDAPP/1

As far as I can tell, I have all of the permissions set so that guests can view the directory, so I am at a loss as to what is causing this.

Thank you,

David

Edited by David B
Posted

Hi Adriano,

I am trying to understand what is the difference between pinned, feature and affiliate.

Pinned - is like a pinned topic. It' clear.
Affiliate - "Mark links as official affiliates and display them in a different section on the Links Directory index" How can I display them in a different sections? Is it a custom work or setting?
Feature - what is the purpose of this? I do not see any difference to the unfeatured links.

Thanks

 

Posted

Pin and feature are a IPS4 feature and appears in all apps (Forums, Gallery, Blog, Records from Pages, etc.).

Pin will make the record appears first in the category listing. It’s the same of pinned topics in a forum. 

Feature will make the record a special record and can be displayed anywhere, like in LD index or in the Link Feed widget. If you wan to see an example, Marketplace here shows some featured files in the index. 

Affiliate comes from old versions of this app and it is exactly for what it does: you can make partners/affiliates. That’s all. I just wanted to keep it, in case someone uses it. There’s a block in the index for the affiliates. 

Posted
6 minutes ago, Adriano Faria said:

Affiliate comes from old versions of this app and it is exactly for what it does: you can make partners/affiliates. That’s all. I just wanted to keep it, in case someone uses it. There’s a block in the index for the affiliates. 

Thank you!

Can you please explain where I can find a block for affiliates? 

Posted
27 minutes ago, Adriano Faria said:

In the app settings -> Link View you can enable and reorder blocks at your wish. 

EDIT: Index view, sorry.

3853DC9C-1B80-4317-9E43-36B571D94ABE.thumb.png.dc0c73087f94ea4b72b85017de29b887.png

 

Thanks. I can see the settings, but the block is not shown. It's a clean install of 4.3.5 with default theme, just for the test on my localhost. 

I can imagine now, how it should look like. It is not important for me to get it run at the moment. Just wanted to report the issue. :blush:

Posted (edited)
5 minutes ago, Adriano Faria said:

Do you have any record shown as affiliate?

Regarding style, it is just like the other blocks. 

Sorry, it works! :biggrin: I have expected to see the block at the right side where categories are. However this one is shown above the WHAT'S NEW block. It took a while to see where the block is. It's very hot in Europe now... very very hot.. 

Edited by Sonya*
Posted
1 minute ago, Sonya* said:

I have expected to see the block at the right side where categories are.

Try the Link Feed widget. It should be an option in its configuration. Let me know if it isn’t; I’ll add in next version. 

Posted

Is there any issue with Location field? I have tried to enter the address of White House:

screenshot-localhost-2018_08.07-11-54-54.png.b26607f4fa680f3bff58ef7fcde7de1f.png

Saved and see that Address Line is not saved.

screenshot-localhost-2018_08.07-11-56-09.png.145a2867e24b225c30aed6d95b118cfb.png

I then edited only description of the link and did not touch location field at all. After that the country disappears as well:

screenshot-localhost-2018_08.07-11-57-42.png.8150c665940d3d1cb3476313d1b345b3.png

I have tried different addresses in different countries. The behavior is the same. 

Posted (edited)

For the view template you have $cfields available as a variable, so you're not using $link-> to call the custom fields.

{{foreach $cfields as $k => $v}}
<li class="ipsDataItem">
<span class="ipsDataItem_generic ipsDataItem_size3"><strong>{lang="links_{$k}"}</strong></span>
<div class="ipsDataItem_generic ipsType_break cLinkInfoData">
{$v|raw}
</div>
</li>
{{endforeach}}

 

Edited by Bluto
Posted (edited)

Works perfect.  Thanks @Adriano Faria 

For anyone else looking to use link directory extra fields in other places / templates (inside the links app).

{{$fields = $link->customFields();}}
{{foreach $fields as $k => $v}}
	{lang="links_{$k}"}
	{$v|raw}
{{endforeach}}

Can also access:

// field_1 being your first extra field you created.

{{$fields = $link->customFields();}}
{$fields['field_1']}

 

Edited by Bluto
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...