-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
[QA] page break (pagination), blogroll not on home page, multimedia dir tree, relative urls etc. #784
Comments
Hello,
If we use the master branch, for widget I am recommend to use |
For Featured image? when creating blog post choose post with featured image. Than you can call it in template example using And htmly allows theme Edit: go ahead if you want to add new features to htmly 😃 |
Ohh, that explains why I couldn't see the image while looking what post's data is available. All imported articles through rss were set automatically as "regular posts". Can't even explain why I didn't even test the post type possibilities. Maybe the post type descriptions were a bit confusing and I thought "featured image" is only an image type of posts, like on demotivator's websites. Same with video ones. Btw. moving manually post file between directories switches its type automatically, thus having the possibility to change post type while editing it in future might be useful for editors. As for theme functions, I'd have to read a bit about it, as I had only a brief look at htmly docs. Also while browsing some theme's dirs haven't seen any of them using custom functions. Anyway, incorporating own functions shouldn't become a problem, even without the support in core functionality. But having possibility to some kind of overload existing functions within template is a nice addon. Long time ago I had an attempt to implement a microblogging feature inside bludit, but I dropped it due to lack of time. Now when I see different types of posts in HTMLy I wonder if you ever had a thought abut such feature. Maybe not exactly as an additional blog post type, but rather independent one, like blog posts differ from static pages. I imagine this can be achieved with current functionality, but whole logic staying with blog workflow is a bit overkill for such short type of content. |
Yes we need to improve the importer, it would be great if we could import xml from WP. It's a good idea to check first at For theme For microblogging, we just need the right theme actually. |
Should microblogging base on actual logic? Got 3 additional questions is there a builtin image gallery? Could you point me to places where I can: |
Do you mean microblogging like Twitter? without title and just the content? with current workflow possible, we just need to not print the title in the template. Or just make the title optional is enough and use the date as the title automatically if we leave the title empty. The url perhaps For comments, I will use one comment file per post. Why? because htmly is a flat file based so I try not to save crucial data in one file, the meaning of crucial here is that if this file is corrupted then the blog cannot run as it should be. Currently the data stored in one file is the page views and menus, this data is not that important compared to other data like username, category, tags, date, slug etc. so even those file deleted then the blog is still running as usual. Currently the image gallery is still very limited and can only be accessed when we add/edit content, this can be developed further, for example creating a new route For thumbnail, I already add such function in master branch, // get recent posts with tag 'featured', max 5 posts
<?php $featured = recent_tag('featured', 5, true);?>
<?php if(!empty($featured)):?>
<!-- Main slider -->
<div class="main_slider">
<?php foreach ($featured as $f):?>
<!-- Article -->
<article class="item">
<div class="item_overlay">
<a href="<?php echo $f->url;?>"><img loading="lazy" width="360" height="240" src="<?php echo get_image($f->body, 360, 240);?>" alt="<?php echo $f->title;?>"></a>
<div class="item_overlay_container">
<div class="item_overlay_category">
<?php echo $f->category;?>
</div>
<div class="item_overlay_content">
<h3><a href="<?php echo $f->url;?>"><?php echo $f->title;?></a></h3>
<div class="item_meta">
<span><?php echo format_date($f->date);?></span>
<?php if (authorized($f->url)):?><span><a href="<?php echo $f->url;?>/edit?destination=post">Edit</a></span><?php endif;?>
</div>
</div>
</div>
</div>
</article>
<?php endforeach;?>
</div>
<?php endif;?> Post with featured image: create_thumb($f->image, 360, 240); For more complete query use // 5 recent posts with featured image
$recentImage= recent_type('image', 5, true);
// 5 recent posts with 'tech` category / use the slug
$recentTech = recent_type('tech', 5, true);
// 5 recent posts from username
$recentUsername = recent_type('username', 5, true); Those recent functions is cached so let say we create magazine like blog, displaying 10 type of posts (from tag, category, type), the performance will not decreased much (already implemented in master branch). Regarding the For changing |
With current logic of content management it's pretty easy to display a "microblog" feed on website like the way on mastodon or twitter as you mentioned. I'm having more on mind backend logic, where posting a microblog entry becomes some kind of a hassle compared to the simplicity of X or FB where I just click a button, enter couple words, add a link or paste text from clipboard and voilla. We have to enter title, select mandatory things like category and tag(s), just like in a fully blog post. Basically additional webpage for microblog entries would be great. Just like the blog posts have the option to be displayed under /blog URI, so could be with /microblog, especially when there was more than 1 registered user. To be honest I haven't seen such functionality in any flat file cms. Not sure about database powered cms and their default functions as I haven't touched such things for years.
It's understandable as those are basic principals you described in docs.
hmm....you'd like to go further by adding a standalone gallery management based on shortcodes, that can be pasted within post content? Didn't think about that. Just had on mind a way of creating a gallery during a post adding/editing basis, but a stanadlone functionality would be fantastic. But still, uploading in more than 1 flat dir (with subdirs) and additional media management (rename,delete etc.) would be more useful at the mean time.
great! I scrolled through functions.php while having first approach to port old template yesterday, but as you say it's a fresh thing not avail in 2.9.9 I have installed.
I'm just used to change default administration URIs as I've seen how many bots and automatic attacks were requesting resources in default paths, especially on wordpress instances. Platforms like prestashop generate custom string in path to admin during installation. Maybe it's time to change approach, as getting to content management as you say requires logging in through /login uri.
ohhh thx for pointing, I was wondering about btw. auto generated ToC function is awesome! |
It should yes for easy to scaling it, like recent microblog with X category, or with X hashtag. For category provide the user with current form as an example (so its mandatory), use show hide Interesting actually, let see how it goes.
Please go ahead if you want to develop the gallery to more advanced gallery.
In htmly, the accepted URLs route are very limited (see: htmly.php). So I'm sure that now it's very safe from attacks as long as you use a strong password, enable the security features (recaptcha etc.). |
Hello
I've got couple questions I haven't found answers to while browsing through issues. By the way I'm not fond of asking them in issues, but there's no message board for talking about htmly, nor even a discussions section on its github.
Either way after using for couple years bludit as a blog cms, I'm not fond of using it anymore. To make it work as I wanted I had to heavily interfere with core files, and updates became very tedious. Just to mention, back then I was considering putting up a blog using htmly, but it lacked many features I needed out of box to make the workflow smooth enough for me.
Now when I'm doing some sort of cleanup in old software I took a peek at htmly's list of features. After a few perturbation I was able to import some old posts and check how things look after couple years. As a sidenote importing data through inbuild rss import option from external atom feed causes a lot or problems.
I'd like to clarify some things before I delve into porting my own template from bludit to htmly, not to find out after spending much time that it was a bad idea.
I've got couple long posts that I had to split into subpages I could link to directly. Is there a way (maybe a shortcode like the one to show posts summary on the wall) that could allow me to split a post into couple pages, and show a pagination below post/page content?
I'd like to show only latest posts on homepage, while having all posts listed under /blog page. Haven't found a snippet in docs, thus I'm wondering if using
foreach ($posts as $key => $p):
instead offoreach ($posts as $p):
and breaking the loop with for example
if( $key == 4 ) break;
would be a good practice?assuming that foreach loop iterates through posts based on creation date
Or better look into
recent_posts()
function and use it or modify it?Are the media files able to be uploaded in wysiwyg editor only to /content/images?
I'm not very fond of supporting only one flat dir, as dozen images inside it always lead to performance problems during opening or during thumbnail creation process. Maybe implementing nested directories for media files are on future todo list?
I suppose that I'd find, and do it anyway, but could you point me to the place where I could change the way urls are handled inside editor field? I'd like to switch from pasting absolute URIs to relative ones. In common wysiwyg editors like tinymce this isn't a problem, but I didn't yet dig much into htmly core files. Still not fond of interfering with core files - as always, works until next update :\
I'd like to implement (more like porting from bludit) user reactions for blog entries but I see that HTMLy doesn't support plugins. Do I have to implement such things as a part of template structure?
The same question applies to comment system. I've read couple threads about comment systems, especially this one
Comment Slug #654
and should I assume that htmly might get its own commenting system?
that's pretty much I wanted to ask at this stage of trying out this blog platform.
The text was updated successfully, but these errors were encountered: