Code Monkey home page Code Monkey logo

refinerycms-page-images's Introduction

Page Images Engine for Refinery CMS

Build Status

About

Page Images allows you to relate one or more images to any page in Refinery which makes it really easy for you to create simple image galleries with lightbox style popups on the front end page views.

Requirements

  • refinerycms-pages ~> 4.0

Features

  • Ability to select one or more images from the image picker and assign them to a page
  • An image can be assigned to more than one page
  • Reordering support, simply drag into order
  • An image assigned to a page can have a caption.
  • An image's caption can be different for different pages

Install

Add this line to your application's Gemfile

gem 'refinerycms-page-images', '~> 4.0.0', git: "https://github.com/refinery/refinerycms-page-images", branch: "master"

Next run

bundle install
rails generate refinery:page_images
rake db:migrate

Now when you start up your Refinery application, edit a page and there should be a new "Images" tab.

Deploying to Heroku

Note: the following information about assets on Heroku might be out of date.

In order to properly precompile assets on Heroku, config vars must be present in the environment during slug compilation.

heroku labs:enable user-env-compile -a myapp

otherwise you may experience the following error:

could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?

More Details

Enable Captions

You can enable captions using an initializer containing the following configuration:

# app/config/initializers/refinery/page-images.rb
Refinery::PageImages.captions = true

By default, captions are WYM editors. Prefer textareas? Gotcha :

Refinery::PageImages.wysiwyg = false

Note that WYMeditor support requires that you have the extension in your Gemfile:

gem 'refinerycms-wymeditor', ['~> 2.0', '>= 2.0.0']

Usage

app/views/refinery/pages/show.html.erb

If you don't have this file then Refinery will be using its default. You can override this with

rake refinery:override view=refinery/pages/show

If images have been assigned to a page several objects are available for showing on the page. They are

  • @page.images: A collection of images assigned to the page.
  • @page.caption_for_image_index(i) will return the caption (if any) for the ith image in @page.images
  • @page.images_with_captions: A collection of image_with_caption objects with the attributes image: and caption:
<% content_for :body_content_right do %>
  <ul id='gallery'>
    <% @page.images.each do |image| %>
      <li>
        <%= link_to image_tag(image.thumbnail(geometry: "200x200#c").url),
                    image.thumbnail(geometry: "900x600").url %>
      </li>
   <% end %>
  </ul>
<% end %>
<%= render :partial => "/refinery/content_page" %>

If you have enabled captions, you can show them like this

<% content_for :body_content_right do %>
  <section id='gallery'>
    <% @page.images.each_with_index do |image, index| %>
      <figure>
        <%= link_to image_tag(image.thumbnail(geometry: "200x200#c").url),
                    image.thumbnail(geometry: "900x600").url %>
        <figcaption><%=raw @page.caption_for_image_index(index) %></figcaption>
      </figure>
   <% end %>
  </section>
<% end %>
<%= render :partial => "/refinery/content_page" %>

or like this

<% content_for :body_content_right do %>
  <section id='gallery'>
    <% @page.images_with_captions.each do |iwc| %>
      <figure>
        <%= link_to image_tag(iwc.image.thumbnail(geometry: "200x200#c").url),
                    iwc.image.thumbnail(geometry: "900x600").url %>
        <figcaption><%=raw iwc.caption %></figcaption>
      </figure>
   <% end %>
  </section>
<% end %>
<%= render :partial => "/refinery/content_page" %>

Refinerycms-blog support

Contrary to its name, refinerycms-page-images also works with refinerycms-blog and adds the functionality to link images to blog posts.

If refinerycms-blog is installed on your rails app, refinerycms-page-images will automatically detect it and perform the adequate initialization. PageImages are assigned to a polymorph "page" object, wich can be a Refinery::Page or a Blog::Post.

Thus, once installed, you can simply call a blog post's images the same way you'd call them for a page, like this

<% @blog_posts.each do |blog_post| %>
  <ul id='gallery'>
    <% blog_post.images.each do |image| %>
      <li>
        <%= link_to image_tag(image.thumbnail(geometry: "200x200#c").url),
                    image.thumbnail(geometry: "900x600").url %>
      </li>
   <% end %>
  </ul>
<% end %>
<%= render :partial => "/refinery/content_page" %>

Screenshot

Refinery CMS Page Images Screenshot

refinerycms-page-images's People

Contributors

3zcurdia avatar akselsson avatar anitagraham avatar bobbus avatar bricesanchez avatar cerebroso avatar davidbennettpio avatar dependabot-preview[bot] avatar dependabot[bot] avatar djones avatar duarme avatar kevinsmouts avatar kovalevsky avatar matho avatar mhaylock avatar mirosr avatar nowaterlili avatar palodelincak avatar parndt avatar pedropag avatar peterberkenbosch avatar phiggins avatar prokopsimek avatar richlarcombe avatar simi avatar skeller1 avatar snowsunny avatar soupmatt avatar ugisozols avatar wakeless avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

refinerycms-page-images's Issues

images_with_captions not retrieving anything on the frontend

After trying to make usage of the images_with_captions object and following the guide for displaying all my images as follows:

<section id='gallery'>
    <% @page.images_with_captions do |iwc| %>
      <figure>
        <%= link_to image_tag(iwc.image.thumbnail(geometry: "200x200#c").url),
                    iwc.image.thumbnail(geometry: "900x600").url %>
        <figcaption><%=raw iwc.caption %></figcaption>
      </figure>
   <% end %>
  </section>

Nothing seems to be rendering on the frontend. I noticed that new code was checked in 26 days ago for this, but currently it's not rendering at all.

One image is still shown in Administration after deletion

I encountered an issue in the page-images engine.

When I add some images to a page (more than one) and then I deleted them all from the administration of page (Images section in page edit), I save the page and I go back to the page administration to the Images section one of the Images is still there (again).

Did anyone of you encountered the same issue? Or am I doing something wrong? I have encountered this issue on multiple sites, some of them have only the "out-of-the box" version of refineryCMS just with the page-images engine applied. Without any custom changes.

This issue is maybe somehow related to the #46 I have also encountered.

Do you have any idea what am I doing wrong? Or can you confirm that there really is some issue? Thx!

I use:

  • ruby 1.9.2p290 (2011-07-09 revision 32553
  • rails (3.0.11)
  • refinerycms (1.0.9)
  • refinerycms-images (1.0.9)
  • refinerycms-page-images (1.0.4 b304279)

Add Images to Engines by Config

Hi,

Would you welcome a pull request for a modification to Page Images that allows you to set the engines/models you want to have page engines by an initializer or config option?

I've forked a copy and keep adding bits to it as I want things to have images associated with them, which made me think that doing it by initializer would be perfect.

Any thoughts?

Cheers,

John

generator does not work with refinery 0.9.9

trying to add refinerycms-page-images to fresh upgrade to 0.9.9 (now working otherwise, thank you!).

$ bundle install

then error occurs at:
$ rails generate refinerycms_page_images

[WARNING] Could not load generator "generators/refinerycms_page_images_generator". 
Error: superclass mismatch for class RefinerycmsPageImages.
../gems/refinerycms-page-images-1.0.2/lib/generators/refinerycms_page_images_generator.rb:1

of which the referenced line is (in the page-images gem):

class RefinerycmsPageImages < Refinery::Generators::EngineInstaller

How to add page-images caption to acts_as_indexed?

Hi

I am trying to add page-images to be indexed in acts_as_indexed for the Extension "Refinerycms-search"

i have added "acts_as_indexed :fields => [:title, :body]" to the model, but it dosnt work.

How can i enable page-images for the search extension?

thanks very much!

Generator fails

I get the following error
/home/panosjee/.rvm/gems/ruby-1.9.2-p0/gems/refinerycms-page-images-0.9.8/lib/refinerycms-page-images.rb:28:in `block in class:Engine': uninitialized constant Refinery::Pages::Tab (NameError)

cannot add imagens using the "search" feature

For some strange reason when using the search input the images won't be added.

To reproduce the error:

  1. click on de Add Image, opening the gallery
  2. use the search to find any of the existing images that you have
  3. select the image and click "insert image"
  4. nothing will happen.

We tried to fix this but the error is way too deep into the javascript functions.
On our debug tests the error starts on the "insert.html.erb" file (view), line 44 "image_dialog.init"

When using the normal way of insert images, the callback works, when using the result after a search the callback always return null.

Fixing it manually - to keep debugging it - resulted in another error on the file "refinery/admin.js", line 854 on the function ".click($.proxy(_this.submit_image_choice, _this));" that always return an error

This is causing a big problem for my team here, as we are close to the deadline of a project and the client is really needing the search to work properly to add images.

Anyone have a clue or can help to fix this? Maybe we are debugging it wrong, so if anyone can look into this I'll be very thankful.

Thanks!

Post-install issue on 0.9.9

I got the install to work all the way through db:migrate. Once I go to edit any page in the app, I now get this. Any ideas?

ActionView::MissingTemplate in Admin/pages#new

Showing /home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-page-images-1.0/app/views/admin/pages/tabs/_images.html.erb where line #2 raised:

Missing partial admin/pages/images_bar with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]} in view paths "/home/jon/Projects/waipio/app/views", "/home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-i18n-0.9.9.7/app/views", "/home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-generators-0.9.9.1/app/views", "/home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-0.9.9/resources/app/views", "/home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-0.9.9/dashboard/app/views", "/home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-0.9.9/core/app/views", "/home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/devise-1.1.5/app/views", "/home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-0.9.9/authentication/app/views", "/home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-0.9.9/images/app/views", "/home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-0.9.9/settings/app/views", "/home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-0.9.9/base/app/views", "/home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-0.9.9/pages/app/views", "/home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-page-images-1.0/app/views"
Extracted source (around line #2):

1:


2: <%= render :partial => 'images_bar' %>
3: <%= render :partial => 'images_field' %>
4:

5:
Trace of template inclusion: /home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-0.9.9/pages/app/views/admin/pages/_form_page_parts.html.erb, /home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-0.9.9/pages/app/views/admin/pages/_form.html.erb, /home/jon/.rvm/gems/ruby-1.9.2-p0@refinery/gems/refinerycms-0.9.9/pages/app/views/admin/pages/new.html.erb

Rails.root: /home/jon/Projects/waipio

Adding Pagination to view

I currently have a page with 10+ images being rendered. Is there a way to add pagination to this engine and set a total of 5 images to display before you're required to head to the next page.

Images tabs disappear when adding news (?)

This looks pretty strange...
I have the images tab on my page (using this gem), i also use the refinerycms-news gem.
When i click "Create news", the images tab disappear from all my pages, i have to reboot the process the have them back.
As disappear i mean

::Refinery::Pages.tabs_for_template(@page.view_template)

became void.

Any idea?

My Gemfile:

gem 'refinerycms', github: 'refinery/refinerycms', branch: '2-1-stable'
gem 'refinerycms-acts-as-indexed', github: 'refinery/refinerycms-acts-as-indexed', branch: '1-0-stable'
gem 'refinerycms-page-images', github: 'refinery/refinerycms-page-images', branch: '2-1-stable'
gem 'refinerycms-news', github: 'refinery/refinerycms-news', branch: 'master'
gem 'refinerycms-i18n', github: 'refinery/refinerycms-i18n', branch: '2-1-stable'
gem 'refinerycms-inquiries', github: 'alepore/refinerycms-inquiries', branch: 'master'

Could not find generator refinery:page_images

Title is self-explanatory

using gem like this

Gemfile:

gem 'refinerycms', :git => 'https://github.com/resolve/refinerycms.git'
gem 'refinerycms-i18n',   '~> 2.0.0', :git => 'https://github.com/parndt/refinerycms-i18n.git'
gem 'refinerycms-blog', :git => 'https://github.com/resolve/refinerycms-blog.git', :branch => 'rails-3-1'
gem 'refinerycms-page-images', :git => 'https://github.com/resolve/refinerycms-page-images.git', :branch => 'rails-3-1'

then following installation guide stumble upon following error:

$ rails generate refinery:page_images
Could not find generator refinery:page_images

heroku pre-compiling assets now fails

So now that I've added the refinerycms-page-images gem and deploy to heroku, when it goes to pre-compile the assets to add to the slug, it fails with the message:

Running: rake assets:precompile
   rake aborted!
   could not connect to server: Connection refused
   Is the server running on host "127.0.0.1" and accepting
   TCP/IP connections on port 5432?

I am running Rails 3.2.6 and refinerycms/refinerycms-page-images '~> 2.0.0'

I found some articles online which say they solved the issue by adding this line to their config/application.rb file:

config.assets.initialize_on_precompile = false

But that resulted in a different error for me:

   Running: rake assets:precompile
   rake aborted!
   undefined method `admin_dialogs_path' for #<Module:0x00000005d92da8>
   (in /tmp/build_2lptj1tk77zwu/vendor/bundle/ruby/1.9.1/gems/refinerycms-core-2.0.5/app/assets/javascripts/refinery/boot_wym.js.erb)
   Tasks: TOP => assets:precompile:primary
   (See full trace by running task with --trace)
   Precompiling assets failed, enabling runtime asset compilation

Now I dont know what to do to fix this. What should I do?

migration error

I was getting the error that is mentioned on the home page "uninitialized constant Refinery::Pages::Tab" and did you recommendation to update refinerycms. when I do a rake refinery:update I get the below error. Would you have any idea why I might be getting this error? After the update for refinerycms I'm now using 0.9.9.pre.

$ rake refinery:update
(in /Sites/web/profc)

=== ACTION REQUIRED ===
Please run rake db:migrate to ensure your database is at the correct version.
$ rake db:migrate
(in /Sites/web/profc)
== AddMissingIndexes: migrating ==============================================
-- add_index(:pages, :parent_id)
rake aborted!
An error has occurred, this and all later migrations canceled:

Index name 'index_pages_on_parent_id' on table 'pages' already exists

(See full trace by running task with --trace)

content_for sample code is overwriting HTML in body_content_right

Hello,
I have copied/pasted the sample render code from the README into /pages/show. The code seems to replace the HTML in the right content section. If I move the content_for block below the render :partial /shared/content_page , then the HTML displays but not the images. I thought content_for was supposed to append the content to the section, but are you overwriting this feature somewhere? Any help is much appreciated.

Nick

How can i insert multiple images without open image picker again ?

i enable multiple to true in refinery/admin/images/insert.html.erb(you can use ag 'new ImageDialog' bundle show --paths in your project folder to locate that code), i can select multiple images, but when i click insert button, there is only one image inserted.

thanks !

tags on images

Hello,
I need to organize the images by tags
anyone can help me?
Thanks

Large Image causes Template Missing Error

When uploading an image that is too large, the following error occurs:

Template is missing

Missing template refinery/admin/images/create, refinery/admin/create with 
{:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in: 
* "/Users/nick/Rails/refinery_test/app/views" 
* "/Users* "/Users/nick/Rails/refinery_test/app/views" 
* "/Users/nick/.rvm/gems/ruby-1.9.2-p290/bundler/gems/refinerycms-page-images-ea5d9314e770/app/views" 
* "/Users/nick/.rvm/gems/ruby-1.9.2-p290/bundler/gems/refinerycms-inquiries-5ceec4c9391f/app/views" 
* "/Users/nick/.rvm/gems/ruby-1.9.2-p290/gems/seo_meta-1.2.0.rc3/app/views" 
* "/Users/nick/.rvm/gems/ruby-1.9.2-p290/bundler/gems/refinerycms-fc3f05dce316/pages/app/views" 
* "/Users/nick/.rvm/gems/ruby-1.9.2-p290/bundler/gems/refinerycms-fc3f05dce316/resources/app/views" 
* "/Users/nick/.rvm/gems/ruby-1.9.2-p290/bundler/gems/refinerycms-fc3f05dce316/images/app/views" 
* "/Users/nick/.rvm/gems/ruby-1.9.2-p290/bundler/gems/refinerycms-fc3f05dce316/dashboard/app/views" 
* "/Users/nick/.rvm/gems/ruby-1.9.2-p290/bundler/gems/refinerycms-fc3f05dce316/authentication/app/views" 
* "/Users/nick/.rvm/gems/ruby-1.9.2-p290/gems/devise-2.0.4/app/views" 
* "/Users/nick/.rvm/gems/ruby-1.9.2-p290/bundler/gems/refinerycms-settings-9a2d8d3272be/app/views" 
* "/Users/nick/.rvm/gems/ruby-1.9.2-p290/bundler/gems/refinerycms-fc3f05dce316/core/app/views" 

Last image is still shown in FrontEnd after deletion

I encountered an issue in the page-images engine.

When I add some images to a page (even only one) and then I deleted it from the administration, it is still shown in the front end.

Maybe I use bad method for showing images in the front end, or there is a bug? Not sure.

I use the following code for showing images in the front end:

<% if @page.images.length>0 %>
    <% @page.images.each do | el | %>
        <img src="<%=  el.thumbnail("772x550").url %>" alt="" />
    <% end %>
<% end %>

Do you have any idea what am I doing wrong? Or can you confirm that there really is some issue? Thx!

I use:

  • ruby 1.9.2p290 (2011-07-09 revision 32553
  • rails (3.0.11)
  • refinerycms (1.0.9)
  • refinerycms-images (1.0.9)
  • refinerycms-page-images (1.0.4 b304279)

similar to issue 13 - not able to save images using refinerycms 0.9.9.21 and page-images 1.0.4

when trying to save - get the following error:

pages#update (ActiveRecord::StatementInvalid) "PGError: ERROR: relation "image_page_translations" does not exist\n: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull\n
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"image_page_translations"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

.bundle/gems/ruby/1.8/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract_adapter.rb:207:in `log_without_newrelic_instrumentation'

caption popup does not save input

Maybe i did something wrong but for me the "Done" button is not working. I can only close the window by pressing x.

Nearly forgot to mention that i only get this issue when running refinery-edge and rails 3.1

Can not save images in page

It seems that I also have the issue of not being able to save images. Here is the output:

Dragonfly::ImageMagick::Utils::ShellCommandFailed in Admin::ImagesController#create

Command failed (identify  /var/folders/lt/ltkWK9Z8EI0ygkmLGaJAnU+++TI/-Tmp-/RackMultipart20110528-60068-13a1ygr) with exit status 127
Rails.root: /Users/refinerycms/shanthi1

Application Trace | Framework Trace | Full Trace
Request

Parameters:

{"utf8"=>"โœ“",
 "authenticity_token"=>"CDhl984QkDAO4g2p06w5ZS9we8qKw1XPJowZe3Ih8CU=",
 "image"=>{"image"=>[#>]},
 "wymeditor"=>"",
 "modal"=>"true",
 "dialog"=>"true",
 "app_dialog"=>"true",
 "field"=>"",
 "update_image"=>"",
 "thumbnail"=>"",
 "callback"=>"image_added",
 "conditions"=>"",
 "insert"=>"true"}

lightbox style

I am sorry If I am missing something but I cant seem to get lightbox functionality out of this plugin. Is this something I have to manually add? I cant seem to find any info on how to add this so Im guessing Im missing something in the installation? All I get when I add the pictures to the image tab is an unordered list with photos. I also cant seem to select more than one photo at a time to add to the gallery even though it seems that is also a feature. Any ideas on what I am missing?

Thanks!
G

Images tab layout broken with many images

broken layout

After adding a dozen images the images tab layout is broken. The buttons at the bottom of the page still appear in the proper place so this is not a major issue.

fields_for error in admin/pages/tabs/_images_field (v1.0)

When doing a fresh install of Refinery 0.9.9 and then adding page-images 1.0 I get this error:

refinerycms-page-images-1.0/app/views/admin/pages/tabs/_images_field.html.erb where line #3 raised:
undefined local variable or method `f' for #<#Class:0xb89ca00:0xb893ec8>

Extracted source (around line #3):

1: <div class='wym_box field images_field'>
2: <ul id='page_images' class='clearfix'>
3: <%= f.fields_for :images do |image_form| %>
4: <li id='image_<%= image_form.object.id %>'>
5: <%= image_form.hidden_field :id %>
6: <%= image_fu image_form.object, '135x135#c' %>

I have tried starting from scratch twice with the same result. page-images 0.9.9 works fine, however this lacks the caption functionality that I am after.

Rename + Improve Documentation

Despite its name, page-images actually works with other engines like blog posts. We should rename this engine to be more clear, and we should also improve the documentation to clarify this and provide detail on how to hook it up.

Cannot reorder pages

I'm getting an error while trying to reorder pages from refinery backend:

SystemStackError (stack level too deep):
  actionpack (3.2.16) lib/action_dispatch/middleware/reloader.rb:70

I'm using refinery 2.1.1 with 'refinerycms-page-images (2.1.0)'. I tested this behaviour on sqlite and postgresql databases with rails 3.2.16 and ruby 1.9.3.

It can be easily reproduced:

  1. Add gem 'refinerycms-page-images', '~> 2.1.0' to Gemfile
  2. run bundle
  3. Open 'Pages' tab in the backend
  4. Try to reorder the pages

WYSIWYG captions tab broken after re-ordering page images

Hei,

when first attached images are re-ordered and then a WYSIWYG caption is edited AND when a WYSIWYG caption is edited twice, the editor tab breaks with:

Uncaught TypeError: Cannot read property 'split' of undefined page-image-picker.js?body=1:168

Any idee how to fix this?

[gem versions refinerycms 2.1.2 and refinerycms-page-images 2.1.0]

screen shot 2014-05-15 at 14 06 42

captions shuffle when adding additional image

when adding a new picture with caption to a page with page-images, all old captions shuffle?! thus it is impossible to incremental update a page with new images. all captions have to be entered all over again at once.

(refinerycms 1.0.8, refinerycms-page-images 1.0.4)

generator did not install db migration

What I did: (*running refinerycms MASTER *)

added to Gemfile:
gem 'refinerycms-page-images', '~> 0.9.4'

install:
$ bundle install
...
Installing refinerycms-page-images (0.9.5)
...
$ rails g refinerycms_page_images


Now run:
rake db:migrate


$ rake db:migrate
(in /home/sbeam/public_html/chp/refinerycms)
$

problem = no migrations happened and in fact there is none showed up in db/migrate/
expectation = new migration file in /db/migrate and migration takes place

I'm not sure, but shouldn't the migration be under /lib/generators/templates/db/migrate in the gem, for this install method?

No image in DB when add to Image part

 "images_attributes"=>{"0"=>{"id"=>""}}, 
 "draft"=>"0", "parent_id"=>"", "custom_title_type"=>"none", 
 "custom_title"=>"", "skip_to_first_child"=>"0", "link_url"=>"", 
 "show_in_menu"=>"1", "browser_title"=>"", "meta_keywords"=>"", "meta_description"=>""}, "continue_editing"=>"false", "id"=>"7"}

But i add an image and in editor it is shown.
Upload of image is completed succesfully, but not inserted.
Gem version is 1.0.4

cat Gemfile.lock | grep refin
    refinerycms (1.0.0)
      refinerycms-authentication (= 1.0.0)
      refinerycms-base (= 1.0.0)
      refinerycms-core (= 1.0.0)
      refinerycms-dashboard (= 1.0.0)
      refinerycms-images (= 1.0.0)
      refinerycms-pages (= 1.0.0)
      refinerycms-resources (= 1.0.0)
      refinerycms-settings (= 1.0.0)
    refinerycms-authentication (1.0.0)
      refinerycms-core (= 1.0.0)
    refinerycms-base (1.0.0)
    refinerycms-core (1.0.0)
      refinerycms-base (= 1.0.0)
      refinerycms-generators (~> 1.0)
      refinerycms-settings (= 1.0.0)
    refinerycms-dashboard (1.0.0)
      refinerycms-core (= 1.0.0)
    refinerycms-generators (1.0.2)
    refinerycms-i18n (0.9.9.14)
      refinerycms-core (>= 0.9.9.8)
    refinerycms-images (1.0.0)
      refinerycms-core (= 1.0.0)
    refinerycms-inquiries (1.0.1)
    refinerycms-page-images (1.0.4)
      refinerycms-pages (>= 0.9.9.1)
    refinerycms-pages (1.0.0)
      refinerycms-core (= 1.0.0)
    refinerycms-resources (1.0.0)
      refinerycms-core (= 1.0.0)
    refinerycms-settings (1.0.0)
      refinerycms-base (= 1.0.0)
    refinerycms-theming (1.0.1)
      refinerycms-core (>= 0.9.9.15)
      refinerycms-generators (~> 1.0.1)
  refinerycms (= 1.0.0)
  refinerycms-generators
  refinerycms-i18n (= 0.9.9.14)
  refinerycms-inquiries
  refinerycms-page-images (~> 1.0)
  refinerycms-theming

Build fails, the Gemfile needs an update.

The build is failing because the branch rails4 no longer exists in the refinerycms repo. Also, the repo for globalize3 no longer works and the gem mime-type needs to be added.

Not saving Page Image settings - Rails 4 + S3

Anyone got this working on Rails 4 and S3?

I am able to upload files without any errors. I also do not get any errors when the user saves the page.

But all the image captions and settings don't save in the database when you go and edit that page again.

Any ideas?

Images for especific page language

Hi,

I have a website where I have pages with 2 languages, and each language has different images.

How can I correctly solve this problem?

Thank you

Add drag drop to add images.

I have a query. Can we add drag and drop functionality with the pages-images plugin? I have a requirement where I need to be able to add the images using drag and drop functionality. Any help would be appreciated.

Mutli-image insertion

Hi, it would be great to have the ability to add more images at once, when using page images.
Also a prehighlight of all the uploaded images would be a great feature (Use case: I want to insert couple of pageimages, they're not uploaded yet. So I upload them all in page images insert dialog, and I want to insert them all. So if they were prehighlighted in the images for insertion, and I could only click once to insert them all, it would be great). Great refinery plugin btw. Thanks for all your great work.

Version 2.1.0

In gemfile, it is impossible to use :
gem 'refinerycms-page-images', '~> 2.0.1'

I had to fork the project to modify the dependency and used
gem 'refinerycms-page-images', :git => 'git://github.com/arnie05/refinerycms-page-images.git'

Everything is working as before, therefore I think a version 2.1.0 should exist to follow refinerycms versioning.

Post-install issue on 0.9.9 (continued...)

I am not sure why this closed, but reference Issue 5 in addition to this:

I couldn't get the gem to install using the Gemfile reference and 'bundle install' alone, so I cloned this https://github.com/resolve/refinerycms-page-images.git and did 'gem build' using the .gemspec ... sounds like I need to use a different source?

Lastly, if there is a way to get the Gemfile 'gem' reference to be aware of the correct source (something like a :git or :source parameter), can you share that? I've done it before for local gems but never a remote gem for which the gem installer couldn't just find it... thanks for the help if so.

Unpermitted params images_attributes resources_attributes

If I add the refinerycms-page-images to my rails 4 refinery project (currently I am working with all gems from the master) I always get an unpermitted images_attributes if I add a new image in the context of creating or updating a page.

How can this be fixed?

I already tried to override the new_page_params and the page_params method in the Refinery::Admin::PagesController - but it does not work. I also use an modified version of the refinerycms-page-resources gem (fix of dependencies to the refinerycms gem).
Here I always get unpermitted resources_attributes.

Anybody an idea how this can be fixed in both gems - ideally directly in both gems - independent from each other, like a new page_extensions_params method which will be merged with the new_page_params and the page_params methods from the Refinery::Admin::PagesController direclty in this controller?

Anybody an idea?

Captions not working

When I add a caption to an image it's not adding it to the database when I click on 'Save'. But If I manually add a caption to an image directly within the database it will show it within the pop-up and if I add / modify the text it will change it in the database. So for some reason it will not add a caption if it's blank.

Refinerycms = 0.9.9.16
refinerycms-page-images = 1.0.3

captions do not work

<% @page.images.each do |i| %>
    <%= link_to(i.url, :class => "figure", :title => "click to enlarge") do %>
        <figure>
            <%= image_tag(i.thumbnail("200x200#c").url, :class => "thumbnail", :alt => strip_tags(i.caption) ) %>
            <figcaption>
                <%= raw i.caption %>
            </figcaption>
        <figure>
    <% end %>
<% end %>

raises

undefined method `caption'

Add images with tab to wysiwyg redactor

Hi, I newby in Refinery, and I install your News Engine. But I need to add images to Engine model - Item. I see your issue #65, and I have my config:

config.mountable = ["Refinery::Page", "Refinery::News::Item"]

But I need tabs in admin panel too. Please help me if it possible.

Clicking caption button in 1.0.1 does nothing?

I think the problem is that the textarea which is supposed to appear alongside each thumbnail doesn't exist in the view template. In the page-images script, the query list_item.find('.textarea_wrapper_for_wym > textarea'); comes up empty.

undefined method `exitstatus' for nil:NilClass

I am Getting this error and i dont know what to do can someone tell me what the exitstatus is. and why it is stoping me from up loading my image from my computer to the localized website...

Title Can't Be Blank when creating new pages

After upgrading the page images engine from 1.0.3 to 1.0.4 I can't save new pages you get the error "Title Can't Be Blank when creating new pages". Didn't investigate the reason but the behavior is consistent, gone back and forth between 1.0.3 and 1.0.4 a couple of times.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.