-
-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] QOL features: splitting lang, visits counter #791
Comments
|
ad1. yes, I'm working on it slowly, translating software to PL leads often to headache. I need to work on it on a fresh file as using current state is more problematic. ad.2. maybe adding an option to stay logged in for longer time than browser session (or default php settings on shared hosts) would also be a good idea? ad.3 great to hear that :) ad.4 that's what I've done, but changes obviously won't last after upadate. btw. shouldn't backup function also store site config? If we change default options add for example add custom keys, and use them in template, they will be lost during import into a new htmly instance. ad5. ohh great you already thought about custom blocks. Could you shred some light about the future workflow? ad.6 additional config option in "config>writing" sounds great. ad.7. I ended up with using user dir along with checking path to img
probably checking first if path to img is absolute or relative, and then either base on default $source_img or use above change would be better, rather than ending up with relative path to img. maybe a bit late, but wouldn't allowing the user to switch between absolute and relative links be an option to reconsider for future versions? Option could be available only for fresh installations before adding content. |
I couldn't remind myself why exactly did I ask for hidden pages, and I completely forgot that I wanted to create a template to display archive page with all posts, and a page with all defined categories and their descriptions. Maybe also a whole list of tags and links to related pages. Currently the URI to /archives and /categories shows 404 page and the only approach I can think of is by creating 2 static pages: archive and categories, and create static--archive/categories.html.php. But it requiers creating a custom menu. Maybe you already have a better idea or working solution? |
After finding out in #793 that sitemap.static.xml lacks subpages I've changed a bit sitemap_page_path() function:
|
As for disabling the page counter for logged in user in point 2, I went a bit further as add_view($page) func counts every page refresh, bots, and crawlers. Exceptions doesn't count common webcrawler's visits, check if user agent is set and not empty (assuming it's a true visitor) counting the same page hit/refresh only once per session.
|
I'm still working on migratiion and during the process I was wondering if there are things I'm missing and just can't find the way of implementing them. Maybe you could shred some light on those matters
Setting a language in config applies to both frontend and backend. I switched the language to polish, and the translation is so bad (I presume it was made by a translator or taken from platform for community translation of software) that I was wondering if there's a way of splitting lang setting to have different language in frontend and backend. The more, if there's a way - maybe a function - I can call within theme functions file or template to check user's browser language, and load the apropriate lang.ini.
In getsimple cms there's a $LANG var that is used for frontend language inside theme files.
While editing some of the imported articles I've realized that popular posts base on a simple page visit counter. This affects somewhat the purpose of popular_posts() funct. Is it a sufficient solution to use
logged()
func in functions.php to disable counting visits for logged user?It needs 3-4 changes in URIs inside functions.php thus I thought that implementing an option to set this "path" in config file would allow the user to get a functionality of "news" cms rather than only for blogging purpose. It won't change the purpose of using this cms but would allow additional workflows without interfering with source files.
I had to add menu items in backend (pointing to for example external file uploader). Since there are custom config keys that can be used inside themes, I wonder if such keys could be automatically rendered inside admin theme. This way user could create a direct links to for example edit or view a certain page. Long time ago I created somewhat a simple notepad plugin for getsimple, that created a hidden page, and added menu item for editing this page and displaying its content in a modal window. It was very helpful during new post or article creation when I needed to check syntax or copy something I have saved in notepad-like page for future usage.
What is the best approach to create an editable but hidden from direct access pages?
I've read some issues and questions about it, but didn't find any builtin' option.
There are many purposes for it, like custom but editable blocks on frontpage (custom config keys aren't always suitable for such things), pages that could be loaded in modal window, pages that could have own theme file with implemented forms displayed in modal window
etcetera,
Static pages are automatically added to the menu, thus user would need to create static menu in menu editor not to show such pages. I presume such pages are added to sitemap, thus it requires interfering with core files to add exceptions
I'm not fond of using draft type of pages for such things in any cms. It's not the base purpose of such pages.
Adding such pages to a fixed category would also need to mess with core files to add exceptions in displaying such pages, adding them to rss, sitemap and so on.
I wondered if there's an option to set pages as hidden. Something like custom config keys that could be used during post creation, and would store their content in page.md like tags or category, maybe something like
Or just a hardcoded checkbox "hidden page" in post options that would automatically add exception in foreach loops used in template files.
For seo purposes I also miss the robots options related to applying noindex/nofollow/noarchive to page.
Since I'm used to save the page frequently during creation I'm not fond of the workflow that saving a page closes edit mode and redirects the user to posts list. I never trust auto saves functions as they turned out to be useless when I needed them the most - for example during browser crash or power failures. Saving a post should just save it without closing.
Next thing is that link to post isn't pointing to edit it but to view the post on front page. I already missclicked the small "edit" button couple times, and instead clicked on "delete". Made my palms sweat ;)
Maybe an additional button "view" along the [edit][delete] would do the thing, when post title would point to edit the post?
Thought also about adding a column to show post type, but text is a bit too wide, thus I wondered if using icons would be better with type in title attribute.
Any thoughts about this?
I tried the updated functions and dispatch files to check thumbnail generation, which is a must have feature, and it's great that it was implemented.
Basically it works as supposed, but only when image type posts contain full url to img with https://domain/
Generating a thumb when post has a relative
/path/to/dir/img
leads to php warningfile_get_contents(): open_basedir restriction in effect.
As a quick workaround I had to use full path to img in:The text was updated successfully, but these errors were encountered: