S
S
samokrutov2016-01-17 20:13:50
In contact with
samokrutov, 2016-01-17 20:13:50

Is there a working plugin for posting scheduled(!) entries from WP to a VK group?

Guys, tell me please.
I tried different plugins, but I did not find a single working one that would correctly publish the PLANNED post. Who faced?
NextScripts: Social Networks Auto-Poster is very fancy. In theory, in the settings you can make a selection, for example, of a fresh post and publish it, but instead of publishing a post once, it goes around in circles. Although there is a correct parameter: "Wait for news posts". We see a bug. So I could not set it up for pending posts.
VK Poster Group is a great plugin but doesn't support the planned ones.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vitaly B, 2016-01-19
@vitaliy_balahnin

https://wordpress.org/plugins/easy-vkontakte-connect/

A
Alexey Kulakov, 2014-07-28
@maximka19

I'll add my fly in the ointment plus to the previous answers
1) query.Count() > 0 if this is a method from Linq and not defined in the class, then it's better not to do this. It will iterate over the entire IEnumerable, but do you need it? If you need to check if there are elements in the sequence, use query.Any()
2) in if-s, you can only define a query. and then just

if (query.Any())
{
   ViewData["uncheckedProfiles"] = query.ToPagedList(pageNumber, pageSize);
}
else
{
   ViewData["uncheckedProfilesSearch"] = "NoResult";
}

or
3) think you can do something with your ToUpper(). for example, why not just bring everything you need (if you need it) to uppercase and not do unnecessary operations. because, judging by the description on MSDN, ToUpper () produces a copy of the string, that is, it is at least every time the initialization of the variable and copying from one variable to another. In general, read about working with strings from the point of view of the internal structure, for example, the "CLR via C#"
4) in general, judging by your request, only the Where part differs. otherwise it is the same Linq. That is, you can write everything more beautiful, step by step defining all the components.
var query = MongoDBInstance.GetMongoDatabase.GetCollection<User>("UserInfo")
    .AsQueryable<User>();
if (!string.IsNullOrEmpty(searchByName)) {
    var upperCaseSearchString = searchByName.ToUpper()
    string[] names = upperCaseSearchString.Split(' ');
    if (names.Length > 1) {
         query = query.Where(i=>
                            !i.IsActivated && ((
                                i.Name.ToUpper().Contains(names[0]) &&
                                i.LastName.ToUpper().Contains(names[1])) ||
                            (i.Name.ToUpper().Contains(names[1]) &&
                             i.LastName.ToUpper().Contains(names[0]))));
    }
    else {
        query = query.Where(i=>
                            !i.IsActivated && (
                                i.Name.ToUpper().Contains(upperCaseSearchString) ||
                                i.LastName.ToUpper().Contains(upperCaseSearchString)));
          
    }
}
else {
    query = query.Where(i=>!i.IsActivated);
}
query = query.OrderBy(i=>i.ID);
if (query.Any()) {
    ViewData["uncheckedProfiles"] = query.ToPagedList(pageNumber, pageSize);
}
else {
    ViewData["uncheckedProfilesSearch"] = "NoResult";
}

I can’t vouch for the brackets, I wrote directly in the toaster editor

V
Vit, 2014-07-28
@fornit1917

Move part of the code into separate functions so as not to deepen the level of nesting too much.

C
callback, 2014-07-28
@callback

Lots of code duplication. Take the block that repeats 3 times into a separate function and call it with the appropriate parameters

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question