Report of Pages Author (Publisher) name - silverstripe

I'm working on a large scale content-base website
in this website many Users produce content in many type of pages, and i want to know how many users(author) create how many page and produce content (for example in this month)
(no difference on reports or front-end)
is there any add-on?

There is no addon for this. First you have to define what "create how many page" and "produce content".. is this the the act of adding a page? or publishing the page? it editing the page at all producing content?
There is a "core" report in the cms module named Recently Edited. You can examine this to determine how reports work. Then you will need to add various extension "hooks" to track the operations required...
onBeforeWrite
onAfterWrite
onBeforePublish
onAfterPublish
Within these methods you will probably need to log the data you wish to report on along with Member::currentUserID() and remember while in an extenstion to access the object you need to use $this->owner->FieldName (instead of ($this->FieldName).

Related

How to make form like example

there is this site https://www.delinski.at/ and it has a nice form where you can pick some values from dropdowns like Date, Number of Persons etc., and then submit the form. It redirects and I see the values on the redirected page link as parameters (if I have changed the defaults).
I searched for and tried several Form Plugins which all do not seem to work - most recent one (Form Maker) lets me design the form as I want but at the end I realized when I click on Submit, the values are not transfered to the target page (confirmed by Form Maker Support as work as intended). It's confusing because actually that should be a basic funciontality of a HTML form, right?
So I want to know if there are plugins where I can get a similar look&feel like the example given above.
That site is a Static Site Generated framework not WordPress. That site would also be very expensive to build cause that is all coded, and very well:)
You are not actually seeing a form there at all that is just how PHP natively uses the URL to navigate via a button.
Almost all the form plug ins for WP use the database write now and do not pass the parameters of the entered form as a php _ POST with a redirect.
I kind of think what you really are looking for is a faceted search feature
One of the best that comes to my mind is https://facetwp.com/demo/cars/?_vehicle_type=truck
Notice the car icons those are actually search buttons:) Of course you will have to build a template to do that neat stuff on the SSG site you linked but...
here is a really informative write upon how it works to get started.

How to show a list over several pages

I am using Asp.NET MVC4 with Razor.
I want to show a list of items/entries (coming from a database) over several pages where the user can navigate to the next page or a specific page and each page shows e.g. 30 entries. It should be similar to the way the questions are structured in stackoverflow with this little page navigator at the bottom. How would I do that? I would guess that an example already exists but I have not found any.
Right now I show all my items on one page using a partial view in my index-view:
#foreach (var item in Model) {
#Html.Partial("_ItemInList",item)
I could probably only show the first 30 items but how do I store on which page I am and make the links so that the user can navigate to the other pages?
You could use a pagination control. There are many such components. For example you may take a look at MvcPaging hosted on GitHub.
There's an awful lot of ready made pagination controls available if you're looking for a quick result... but you're probably better off rolling your own. You can restrict your result set to a given page size in your data access layer using Linq and populate your model with single page (plus totals, page number etc...).
Depending on how you've structured your application though, you may want to push paging down to the database level and limit the result set size there rather than higher up the stack.

Progressive page loading in ASP.NET MV3?

I'm building a website that on its frontpage has different 'lists' of stories/articles.
You can compare it to Wordpress 'latest articles', 'spotlight articles' etc.
Now every list needs to be created, and filled from the repository.
Which means, that in my controller, I first create/retrieve all the lists, add them to the ViewBag, and then return the view.
In the View i'll then foreach over the items in that list to create a visual list to be shown on the frontpage.
However, when I load the page, I first get a blank page, when the page is loaded, and then at one point everything appears.
Traditionally, you would already see the basic html, text etc, and then the dynamic area's would appear later.
Is it possible to have a similar 'progressive loading' with MVC3?
Its not so much the performance I'm worrying about but more so the user experience of seeing a blank page for several seconds on data-heavy pages.
Thanks :)
If you've got heavy pages with long loading times you might consider loading the pieces more dynamically using an ajax approach.
Your page loads, you execute the requests for the data you require and use some standard loading icon in the meantime.

Scheduling and publishing replacement pages in a CMS

Does anyone have any ideas or know of any plugins to allow pages to be scheduled and replaced.
preamble:
currently evaluating different content management systems for a new project, we create new pages and also updating existing pages for example as part of a 'maintenance release'.
We will be using either PHP (preferably) or C#
Problem:
We would like our users to be write and save a new revision of an existing page with a go-live date and time in the future, at this date and time we would like the page to be live replacing the existing page, but all links to the page, url etc to be the same.
Currently:
We have two separate installs and schedule updates to pages using a cron job and a PHP script running some mysql queries - this has failed us at critical times in the past when it has failed to run.
finally:
We could probably write this ourselves, either in our own CMS or as a plugin to an existing CMS - simply:
SELECT latest_revision from posts_pages_table
WHERE publishable='yes'
AND max(revision_date);
but does anyone have any experience of this with an existing CMS or from a technical point of view foresee any problems?
How for example in a wordpress backend will a user be sure they are updating the latest version of a page if it hasn't gone 'live' yet.
We have looked at all existing CMSs and searched google but scheduling updates to pages seems to be an uncommon occurrence so relying on some guidance from the trusty SO crowd.
thanks
If you are fine with PHP, you can use SilverStripe. To achieve what you are asking you'd use the CMS Workflow module.
SilverStripe CMS comes with two stages built-in: live and draft. You can keep reworking the draft version, which remain private until you are ready to publish. In the normal scenario you would just push to live.
With the CMS Workflow installed, you can additionally choose the date when the modification should go live ("embargo"). This stores your draft version for "later", and only pushes to live at the date you've chosen (this plugs in via the cron job).
There is also an "expiry" you can set on the page, at which point the page will be unpublished and will no longer be available publicly.
Embargo, expiry and publishing operations do not affect the URL nor ID of the page, so all the relations stay intact while you are reworking the page via the CMS.
References:
PDF manual, see page 16 for description of the embargo
Module page with a short description
Source
In Joomla, there is a way to do this out of the box without touching any code. Here's how I would do it -
Create a category for the page that will be getting replaced
Create a menu item pointing to that category. Set it to display 1 item only, ordered by newest date
Create a template override so that the category item displays like an article detail page
Create new articles with a start publish date that determines when it starts displaying
Basically, you'd be displaying a category but it would look like an article. It would always pull the newest article that has reached it's start publish date. It would be easy to keep track of because you would have copies of every version you post, each update you would simply make a copy of the last one to edit.
You could probably write something custom to accomplish the same thing, but why spend the time and effort when it can be done easily with a template override?

VB.Net application - display a message to the user whilst the application is starting up

I have recently created an application where a lot of data is loaded into objects when the application starts up, and other data as it is required. For example if the user requests the catalogue page then it will load all the top level category data into objects of type Category. This will then stay there to be used by other users (who will therefore not have to load this data into objects) and can be altered by admin if they happen to login during the same application instance. I know this is not the most efficient solution, as pointed out below, but it works and the page load, at the moment, is not too long. It is very quick if most of the required data is already loaded into objects. It is also tailored to the business' needs - unlike other techniques such as Linq-to-SQL.
The problem I am facing is when a page is requested which requires lots of data to be displayed about different types of object. For example when a catalogue page is requested which displays information on a product which can be bought, it then loads all the products and categories (as the products make reference to the category object, not just the category name).
I would like to display a loading symbol with a message whilst all this data is being loaded into objects, so the user knows its not just in a loop or anything. Is there any way to do this? I am open to using JS / jQuery if I need to.
Thanks in advance.
Regards,
Richard
PS I am working on ways to make it more efficient - such as using HashTables or HashMaps. However this is taking time as there are so many different types of item (News, Events, Catalogue Item - Range, Collection, Design, RangeCollection, CollectionDesign, RangeCollectionDesign and RangeDesign - Users, PageViews and the list goes on).
Please correct me if I'm wrong, but I do believe that Javascript is required in order to display a "loading" image... Using server-side scriping alone would typically require an entire page load after all the content loads unless you want to start messing with IFrames.
This is a job for AJAX. A common solution to your problem is to have a small page that displays a loading icon. The page has some JavaScript that makes additional HTTP requests to the server to download the rest of the page. JQuery has a "$.ajax" method that is designed to simplify this process.
I would suggest looking at the documentation to the .ajax method in the jQuery documentation. Unfortunately, it seems to be a rather delicate process to get all the scripting code right and it takes a while to learn it all.

Resources