Git Product home page Git Product logo

oc-news's Issues

Subscription regisration doesnt work

Hello,

  1. your pre-made form not working / the button subscription do nothings
  2. on Enter it make an ajax error and nothink is save

have you some solutions ?

Thanks

lemirage
capture d ecran 2015-09-28 a 16 05 12
capture d ecran 2015-09-28 a 16 05 23

need extend toolbars

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

See how convenient it is:
image

Updating news item in plain-text mode doesn't work

Steps to reproduce

  • Open an existing news item
  • Switch to plain-text mode
  • Edit the code (e.g. add a <p> tag)
  • Click Save (you'll get a nice notification that it got saved)
  • Refresh the news list
  • Change has not been applied

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.

make the plugin GDPR conform

Hey Szabó,

I want to make this plugin GDPR conform.
Things to do:

  • Extend subscriber model
  • Double Opt-In for new subscribers
  • Store newsletter subscribing timestamp + IP address
  • Create Opt-In confirmation link
  • Send Opt-In newsletter confirmation
  • Store newsletter subscribing confirmation timestamp + IP address

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?

Translation not working

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:

image

October Build: 316
Version of OC-news: 1.3.9

Failed to save an updated post

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

Pagination not working

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?

more detailed logs

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.

How to count Posts for each Category...

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...

Publish status and date coherence

oc-news/models/Posts.php

Lines 200 to 211 in ddc309e

public function scopeIsPublished($query)
{
if (BackendAuth::check()) {
return $query;
}
return $query
->where('status', 1)
->whereNotNull('published_at')
->where('published_at', '<', Carbon::now())
;
}

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

Exception

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"

postPage = "news"

{% set posts = posts.posts %}

Problem with cronjob

I know this may be slightly off topic, but I am having problems with the queue. When I first add my cron job, it seems to work fine. However, subsequent calls produce this error:

image

Any help would be appreciated. Thank you :)

The Status Popup after an e-mail is confirmed is not shown.

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.

Multilanguage Newsletter

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

Post list and posts not working after update

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?

Post list code

<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) }) }}">&larr; 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 &rarr;</a></li>
        {% endif %}
    </ul>
{% endif %}

Post code

{% 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

Email was send ?

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

How improve mail of newsletters ?

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

Crash on a new post page

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:

$uri = explode('/', Request::path());
$news = Posts::whereId($uri[5])->first();

PHP: 7.1.19
OC build: 437

Email Template

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?


Multiple news feeds

Hi, everyone!

It would be like to have ability to create several feeds for show on different pages.

Incorrect integer value for column 'job_id'

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?

Newsletters are not sending if no category selected

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 display post category ?

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 ?

Translate plugin conflict

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

Multilanguage

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

E-mail confirmation always fails with charset set to uft8mb4 (MySQL, InnoDB).

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.

Twig filter "_" does not exist

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.

How do you use this?

Documentation is severely lacking. How do I implement this into my layout after installing the plugin?

Issue in update 1.5.6

after update I got this error

Class name is not registered for the component "form". Check the component plugin.

Handling large amount of receivers

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.

Send newsletter is sending to all subscribers not respecting the category from the post

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".

Show caregory posts

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.

I Get This Error when Installing the Plugin

"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.

[Feature] Add tags for posts

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!

Running News Plugin on SQLite fires error

Installing the plugin and saving the Data into a SQLite DB fires an error when trying to look at the statistics. Following error is displayed when the Statistics button is clicked.

stacktrace

[FR] Customize newsletter email content from online post

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.

Plugin Improvements

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

  1. post.user not available? Authors of posts should be available as a key feature
  2. Things like post.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 iterations
  3. It's not particularly clear on how to go about email settings like changing default messages and all.
  4. Despite the simplicity of Rainlab.Blog hundred of developers have built extension plugins for it so developers are likely to choose to save some time. For example there's a Blog Views counter for 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.
  5. Since a lot of developers are building on RainLab and not Indikator I think it has to ship with a lot of tools out of box to make it more appealing.

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!!

error when I try to install

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

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.