gergo85 / oc-news Goto Github PK
View Code? Open in Web Editor NEWThis is the simple news and newsletter plugin for October CMS and Winter CMS.
Home Page: http://octobercms.com/plugin/indikator-news
License: MIT License
This is the simple news and newsletter plugin for October CMS and Winter CMS.
Home Page: http://octobercms.com/plugin/indikator-news
License: MIT License
Hi,
please, can you add support for categories? Thank you
Hi @gergo85 can you add unsubscribe facility for subscriber.
Either from front end or there should be link at the bottom of each email sent to subscriber.
Please, extend default editor toolbar. Sometimes it is necessary to change the font size and other parameters.
/models/posts/fields.yaml
example:
tabs:
fields:
...
content:
tab: indikator.news::lang.form.content
type: richeditor
size: giant
toolbarButtons: fullscreen|bold|italic|underline|subscript|superscript|fontFamily|fontSize|color|inlineStyle|paragraphStyle|paragraphFormat|align|formatOL|formatUL|outdent|indent|quote|insertHR|insertLink|insertImage|insertVideo|insertAudio|insertFile|insertTable|undo|redo|clearFormatting|selectAll|html
Steps to reproduce
<p>
tag)Save
(you'll get a nice notification that it got saved)Workaround
Before saving the edited code, switch back to the rich-text view and then click save.
Cause
I'm not familiar with the code, so I've no idea. JavaScript console stays clean so it doesn't seem like some JavaScript command went wrong.
Hey Szabó,
I want to make this plugin GDPR conform.
Things to do:
My plan is to store those timestamps into the subscriber model. Fields to add: (registered_at
, registered_ip
, confirmed_at
, confirmed_ip
, unsubscribed_at
, unsubscribed_ip
).
Any suggestions?
I use your plugin for my website to show some news on the landing page.
But i have some problems with the translation of the plugin. The problem is that translation isn't working. No matter what language is selected the news are displayed in the main language.
Every other plugin works fine with translation.
I changed the content for every language with this translation icon:
October Build: 316
Version of OC-news: 1.3.9
Hi, I've encountered another bug, OC won't save me an updated post, because field named postinfo
doesn't exist in the news_post
table. According to the oc docs, I've found that formwidgets tries to save a data, but disabling the save feature works ok.
For now, I've solved the problem by adding these lines to PostInfo.php:
public function getSaveValue($value)
{
return \Backend\Classes\FormField::NO_SAVE_DATA;
}
PHP: 7.1.19
OC build: 437
I've recently noticed that the pagination as provided by the default posts component doesn't work (anymore?). I just copy and pasted that into my partial page.
The pagination boxes seem to be generated correctly, however the links are just pointing to the root of the website.
Am I doing something wrong or is this indeed broken?
Hey
I plan to create a more detailed log that shows the status of the email sending (queued/sending/sent/viewed/link clicked).
Any suggestion? I try to give you a PR.
Hi,
In the backend of your plugin i'm getting the next JS error:
Uncaught Error: Trigger action is not specified in storm-min.js?v306:2882
Current build: 306
Great plugin by the way 👍
the posts update form ignores locale date formats for update_at
field
Hi,
Many thanks for your useful and great job !
To count how many Posts are in a Category with a simple {{ category.posts.count() }}, it would be useful to add this in your Categories model :
public $hasMany = [ 'posts' => [ 'Indikator\News\Models\Posts', 'key' => 'category_id', ], ];
For example, this information could be added in a badge class span in bootstrap...
Lines 200 to 211 in ddc309e
Maybe published_at
should be set beforeSave()
to now()
if status = 1
?
Otherwise I doesn't imagine which can be the voluntary use of status = 1 && published_at = null
I just installed the Newsletter Plugin. And when i drag and drop add the component post list to the editor and save it works fine. As soon as i command click the component and it expands and later i click save it gives an exception error. Below is the error i get.
We're sorry, but an unhandled error occurred. Please see the details below.
An exception has been thrown during the rendering of a template ("call_user_func_array() expects parameter 1 to be a valid callback, class 'Illuminate\Database\Eloquent\Collection' does not have a method 'posts'").
/home/ibmrbsch/public_html/ibmr.edu.in/themes/ibmr-edu/pages/test.htm line 15
TYPE
Twig Template
EXCEPTION
Cms\Classes\CmsException
sortOrder = "published_at desc"
When emailing an newsletter, Microsoft Outlook ignores height/width of an image.
The Status-Popup after an user confirmes his e-mail is not shown to the new subscriber. It only appears after a backend-user clicks onto the news-tab in the backend.
It should inform new subscribers whether their confirmation/subscription was successful or failed.
Hi,
I would like to make a multilanguage newsletter.
So, in the plugin, all seems ok but how can I use a specific mail template (I create a new template with the right language code - ie indikator.news::mail.email_fr like your indikator.news::mail.email_en - , but it's not working).
Thanks
I've updated the plugin and since then my post list simply claims that there are no posts and when I access a post that worked flawless before, it now suddenly doesn't load. So far I can't really figure out where the issue is...
Did something change that need to be adapted on my end? Any ideas why it suddenly doesn't work anymore?
<ul class="post-list">
{% for post in posts %}
<li>
<img class="img-responsive col-xs-2 col-md-3" src="{{ post.image|media }}" alt="{{ post.title }}">
<h4><a href="news/{{ post.slug }}">{{ post.title }}</a></h4>
<p class="date">{{ post.published_at|date('Y-m-d H:m') }}</p>
{% if post.introductory %}
<p class="introductory">{{ post.introductory|raw }}</p>
{% else %}
<div class="content">{{ post.content|raw }}</div>
{% endif %}
</li>
{% else %}
<li class="no-data">{{ noPostsMessage }}</li>
{% endfor %}
</ul>
{% if posts.lastPage > 1 %}
<ul class="pagination">
{% if posts.currentPage > 1 %}
<li><a href="{{ this.page.baseFileName|page({ (pageParam): (posts.currentPage-1) }) }}">← Prev</a></li>
{% endif %}
{% for page in 1..posts.lastPage %}
<li class="{{ posts.currentPage == page ? 'active' : null }}">
<a href="{{ this.page.baseFileName|page({ (pageParam): page }) }}">{{ page }}</a>
</li>
{% endfor %}
{% if posts.lastPage > posts.currentPage %}
<li><a href="{{ this.page.baseFileName|page({ (pageParam): (posts.currentPage+1) }) }}">Next →</a></li>
{% endif %}
</ul>
{% endif %}
{% partial "title" %}
<div class="container">
<div class="row">
<div class="col-sm-12">
<h4 class="headline"><span>{{ post.title }}</span></h4>
<div class="post">
<p class="post-info">Posted on {{ post.published_at|date('Y-m-d H:m') }}</p>
<img class="img-responsive col-xs-12 col-sm-4" src="{{ post.image|media }}">
<div class="post-content">{{ post.content|raw }}</div>
</div>
</div>
</div>
</div>
URL
domain.com/news/title
Hi,
In your plugin, by default, in a new post, "sending email" button is on and "published" button is selected. If I save the post, email(s) was/were sent ?
Because, in subscribers, in the "sent" column, I have always "0". So, how can I will be sure if email was sent ?
Thanks
Hi Gergő,
I have finished integrating your plugin in my blog pages. It's very smart with this image on the left with text along in my introducy.
But to do that, I must copy in an other place and transform the richeditor.css with :
.fr-view img.fr-dib{margin:5px auto;display:block;float:none;vertical-align:top}
.fr-view img.fr-dib.fr-fil{margin-left:0}
.fr-view img.fr-dib.fr-fir{margin-right:0}
.fr-view img.fr-dii{display:inline-block;float:none;vertical-align:bottom;margin-left:5px;margin-right:5px;max-width:calc(90%)}
.fr-view img.fr-dii.fr-fil{float:left;margin:5px 5px 5px 0;max-width:calc(95%)}
.fr-view img.fr-dii.fr-fir{float:right;margin:5px 0 5px 5px;max-width:calc(95%)}
which became :
img.fr-dib{margin:5px auto;display:block;float:none;vertical-align:top}
img.fr-dib.fr-fil{margin-left:0}
img.fr-dib.fr-fir{margin-right:0}
img.fr-dii{display:inline-block;float:none;vertical-align:bottom;margin-left:5px;margin-right:5px;max-width:calc(90%)}
img.fr-dii.fr-fil{float:left;margin:5px 5px 5px 0;max-width:calc(95%)}
img.fr-dii.fr-fir{float:right;margin:5px 0 5px 5px;max-width:calc(95%)}
Nevertheless, I'm a little bit disapointed when I saw the mail sent : the url of the image is not complete and the css designed for image (.dii .fil) is not present.
I think you use OC facilities to send the mail. Must I contact OC developpers or do you think you can improve that ?
Best regards
TN
Hi, after an update to 1.10.0, I've started to see the php errors about a wrong index of the $url
array. It seems that the 5th element of the url doesn't exist on the new post page.
The related lines:
oc-news/formwidgets/PostInfo.php
Lines 21 to 22 in 8f810b6
PHP: 7.1.19
OC build: 437
Hey there,
When sending a test email the template isn't displaying all of the information. It will display a title but that is all.
The email template I edited:
Settings -> Mail Templates ->indikator.news::mail.email_en
Here is my email template.
<p>New post of the website:</p>
<br>
<p><img src="https://yourwebsite.com/storage/app/media{{image}}" alt=""></p>
<p><em>{{ title }}</em><br>
{{ summary|raw }}</p>
<p>{{ content | raw}}</p>
<p>TESTING P</p>
<p>www.yourwebsite.com/news/{{ slug }}</p>
<br>
<p>Best regards,<br>
The Team</p> ```
Is there a different template I should be using?
Hi, everyone!
It would be like to have ability to create several feeds for show on different pages.
Hi, I have encountered an error during sending the newsletter post. Below is the logged info:
PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'J1So6ywpZLWphxeeRwVbHfV3h8hK7AfS' for column 'job_id' at row 1 in /apps/xxxx/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105
I checked the database table for column "job_id", the current type is "int(10)". Should it be "varchar(255)" type instead?
Hi. Thanks for the great plugin!
I have a question.
In the edit subscriber form there is a hint below categories checkboxes with text "If no category is selected then the subscriber will receive the all newsletters." But when I have a new activated subscriber and no category selected newsletters is not sending to this subscriber. If any category selected everything works as expected.
Looks like the problem is in NewsSender.php:
if (Categories::count() > 0) {
$activeSubscribers = $this->news->category->subscribers()->isSubscribed();
}
How can I generate a unsubscribe link for email-insertion?
Lines 200 to 205 in ddc309e
Could it be added as component option, default to false (doesn't show not published posts even to backend logged users)?
When editing a news entry the preview button is directing to a wrong location.
I have a simple issue but cant find any solutions . i want to display a category that post are into .
i use {{ post.category }}
but it wont work and shows a row af sql log like this :
{"id":1,"name":"New Category","slug":"new-category","content":"<p>test content<\/p>","image":"","hidden":"2","status":"1","sort_order":"1","created_at":"2018-01-27 18:24:29","updated_at":"2018-01-27 18:24:29"}
What can i do to display my post category in post page ?
Hello!
this code in Posts model causes error in Translate plugin:
public $translatable = [ 'title', ['slug', 'index' => true], 'introductory', 'content' ];
because you use ['slug', 'index' => true] translate/Plugin.php gets error on line 237 trying to flip array
$translatable = array_flip($model->translatable);
I just commented ['slug', 'index' => true], because I don't need different slugs for languages
Hi,
In addition to my previous issue (to use the right mail template for the right language), is it possible to make some "categories" for subscribers ?
With that, we can make a newsletter with the right language for the right people.
Thanks
For mysql-databases with charset set to utf8mb4 and InnoDB-Engine the maximum size of VARCHAR is 191 characters. The ConfirmationHandler or the plugin installation does not account for this scenario.
Right now the ConfirmationHandler always creates a token with 255 characters. The token with 255 characters is send to the user, but only the first 191 characters are stored in the database so every e-mail confirmation will fail.
Hi,
I wanted to add posts list to my page and got "Exception" page:
The filter "_" does not exist. Did you mean "url_encode", "json_encode", "date_modify", "number_format", "convert_encoding"
in (...)/plugins/indikator/news/components/posts/default.htm line 24.
After I removed _ filter from Prev and Next in default.html file, component managed to work. I do not undestand Twig yet so everything I can do now is to inform you about the problem.
Documentation is severely lacking. How do I implement this into my layout after installing the plugin?
after update I got this error
Class name is not registered for the component "form". Check the component plugin.
Hey,
I need to handle +10.000k receivers.
I try to find a solution that fits for every needs.
Therefore i would suggest to push the sendings to a queue.
I am click on button "send newsletter", the system is sending the post to everyone subscriber without respect the category of the post.
For instance, I have created a post and selected the category "customers". When I click the button "send newsletter", the system is send the post to every subscriber, and I thought the system should send only to the subscriber related to category "customer".
Hi .
Im created a page with " category.htm" name in cms pages to display categories and list of posts there .
and add url = "/category/:slug?/:page?"
to the head of this page .
After that i add related components to this page like " categories and show posts " .
I 've been showing all the things I wanted right now. But the problem is that I want to click on every category, just show me the posts inside that category. But now all posts are represented in one place .
In fact :slug?
nothing plays a role in filtering the news for that.
"SQLSTATE[42804]: Datatype mismatch: 7 ERROR: column "statistics" cannot be cast automatically to type integer HINT: You might need to specify "USING statistics::integer". (SQL: ALTER TABLE news_posts ALTER statistics TYPE INT)"
I tried installing the plugin multiple times but got the same error.
These might be an issue with the plugin itself. And if so, it needs to be addressed.
Since this plugin supports just a single category for each posts (which I strongly encourage) I think it makes sense for us to add tags!
I have the following feature request:
It should be possible to customize the newsletter email from the online post.
So that the newsletter email content is different to the online post (this one can be longer with more images etc.)
My idea would be to have another tab that shows a toggle switch and a richfield.
The toggle switch allows "enable custom newsletter email", or "override newsletter content".
The richfield shows the post.newsletter_content
for the newsletter email.
In the mail template we check for override_newsletter_content
, if that is set, we take the post.newsletter_content
instead of the post.content
.
@gergo85 Any suggestion or feedback? I would like to implement it till the end of the week.
Thank you awesome developer of this plugin! I choosed your plugin over RainLab.Blog because of the news letter ability and simplicity with which the variables are made available on the page. Also I personally prefer it's interface simple and better. However advanced users may find the plugin incomplete for the following reason
post.user
not available? Authors of posts should be available as a key featurepost.next
and post.prev
and a pagination for posts
(The pagination code on rainlab.blog
seems to work on indikator.news
though) as those are traditional requirements in blog iterationsemail
settings like changing default messages and all.RainLab.Blog
which counts page views and produces a component for popular posts this is (or was not available for Indikator.News) I however created a copy of Blog Views for indikator you can find it here : https://github.com/Fenn-CS/newspageviews works exactly the same way it would work on RainLab.Blog.Available to help if need be, just like newspageviews
I would be building (or copying if you want) more extensions for Indikator.News but please try to fix this basic issues and thank you for the work so far!!
Hi;
I found your plugins in the marketplace and when I try to install it I got this error :
PDOException: SQLSTATE[42804]: Datatype mismatch: 7 ERROR: column "statistics" cannot be cast automatically to type integer
HINT: You might need to specify "USING statistics::integer". in /config/www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105
Now this is my config:
System build: 431
I use October with Nginx + Posgres 10
I hope these info are usefull for you :)
Regards!!
Jonathan
Is there any reason why you don't register the confirmation mail template as well: https://github.com/gergo85/oc-news/blob/master/Plugin.php#L144-L145 ?
@gergo85 View statistics still not working after updating.
Also it will be nice if
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.