Jump to content

Make record image required for Pages, plugin or app


beats23

Recommended Posts

Anyone care to create a plugin or app then sell it in the marketplace, for making the Record Image (field) be able to set as required for separate Pages database?

With this plugin, a user will have to upload an image to the Record image field before they can submit a Pages post (similar to the IPS downloads option for screenshot required before a user can submit a file).

The benefits are. The admin will not have a bunch of submitted articles with no cover photos. Less work for the admin, more time to play for the admin😀

 

1093168698_ScreenShot2019-02-09at16_56_42.thumb.png.868d41b9bac4d21d4724a19f1e4a0835.png

258132071_ScreenShot2019-02-09at16_53_03.thumb.png.40f7730570a2f653c2f144ba01574e60.png

Link to comment

If nobody responds to this, one thing you could do is amend the templates in your database so that

{{if $record->record_image}}
	<div class="cCmsRecord_image">
		<img class="ipsImage" src="{file="$record->_record_image_thumb" extension="cms_Records"}">
	</div>
{{endif}}

becomes something like

<div class="cCmsRecord_image">		
		<img class="ipsImage" src="{{if $record->record_image}}{file="$record->_record_image_thumb" extension="cms_Records"}{{else}}[something else]{{endif}}">
</div>

All you have to do is provide an address to a fallback image and if your user doesn't provide an image, the post will use the one that you've uploaded.

Link to comment
7 hours ago, Meddysong said:

If nobody responds to this, one thing you could do is amend the templates in your database so that


{{if $record->record_image}}
	<div class="cCmsRecord_image">
		<img class="ipsImage" src="{file="$record->_record_image_thumb" extension="cms_Records"}">
	</div>
{{endif}}

 becomes something like


<div class="cCmsRecord_image">		
		<img class="ipsImage" src="{{if $record->record_image}}{file="$record->_record_image_thumb" extension="cms_Records"}{{else}}[something else]{{endif}}">
</div>

All you have to do is provide an address to a fallback image and if your user doesn't provide an image, the post will use the one that you've uploaded.

Where should I place the fallback URL for the image?

Thanks 

Link to comment
13 minutes ago, opentype said:

You can upload it through the “media” section of the Pages app and then put the call where it says “something else” above. 

<div class="cCmsRecord_image">		
		<img class="ipsImage" src="{{if $record->record_image}}{file="$record->_record_image_thumb" extension="cms_Records"}{{else}}[https://www.mysite.com/uploads/site_images/fallbackimage1.jpg]{{endif}}">
</div>

Is this the way the image URL should be placed?

Thanks 

Link to comment

I add this code to the record display but it didn't work any thoughts

<article class='ipsContained ipsSpacer_top'>
	<div class='ipsClearfix'>
      {{if $record->record_image AND !settings.SuperGrid_record_hero}}
			<div class="cCmsRecord_image ipsPos_right">
				<img class="ipsImage ipsPos_right" src="{file="$record->_record_image_thumb" extension="cms_Records"}{{else}}[https://www.mysite.com/uploads/monthly_2019_02/ic44.jpg.acb8bf5ea3b723b7042a2a34a67b0f26.jpg.ca8bc759e76d13c58a17c8eda4a37729.jpg]">
			</div>
		{{endif}}

 

Link to comment
18 minutes ago, beats23 said:

I add this code to the record display but it didn't work any thoughts


<article class='ipsContained ipsSpacer_top'>
	<div class='ipsClearfix'>
      {{if $record->record_image AND !settings.SuperGrid_record_hero}}
			<div class="cCmsRecord_image ipsPos_right">
				<img class="ipsImage ipsPos_right" src="{file="$record->_record_image_thumb" extension="cms_Records"}{{else}}[https://www.mysite.com/uploads/monthly_2019_02/ic44.jpg.acb8bf5ea3b723b7042a2a34a67b0f26.jpg.ca8bc759e76d13c58a17c8eda4a37729.jpg]">
			</div>
		{{endif}}

 

The code's wrong. You've kept the [] quotes I put in there to show some text. Chop them out to leave just the address and that should work.

Or for neatness, as opentype suggests, upload it to Pages > Media. Then you can replace the address with {media='1'} (or whatever the number is).

 

Link to comment
25 minutes ago, Meddysong said:

The code's wrong. You've kept the [] quotes I put in there to show some text. Chop them out to leave just the address and that should work.

Or for neatness, as opentype suggests, upload it to Pages > Media. Then you can replace the address with {media='1'} (or whatever the number is).

 

I uploaded the image to the pages media and edit the records display code to the code below but it doesn't work,  it only displays the image URL on the post page.

Thanks for your help.

<article class='ipsContained ipsSpacer_top'>
	<div class='ipsClearfix'>
      {{if $record->record_image AND !settings.SuperGrid_record_hero}}
			<div class="cCmsRecord_image ipsPos_right">
				<img class="ipsImage ipsPos_right" src="{file="$record->_record_image_thumb" extension="cms_Records"}{{else}}{media="1"}">
			</div>
		{{endif}}

 

I'm still up for a plugin that can set the record image field as required, I'll pay.

Thanks

 

 

 

Link to comment
  • 2 months later...
  • 3 weeks later...
  • 1 month later...
On 4/28/2019 at 12:28 PM, Adriano Faria said:

Ua830cG.png

oJ0NtaY.png

 

 

Thanks for the plugin but there is one issue.

When creating an article for the first time, there is no record image required on the photo tab. 

When I save that article then edit it, in the edit window, the record image required is shown.

Can you alter the plugin so when an article is first created the record image required is shown?

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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