Details
Blog Theme
By Paul
Dec 09, 2018 pm31 9:24 PM (Edited )
Today, I've been working mostly on updating the WSN KB blog theme. That's the theme this blog is based on.
The main change I wanted to make was to add a simple subscription button. It's much better for a blog to have a button to click on the front page for members to subscribe to email notifications of all new blog entries, instead of expecting people to edit their profile and set "Notify of all new blogs" to "yes". To do this I had to change the backend to make it possible to subscribe with a click. And then it seemed like a good idea to have the button available to guests too, by making it take them to a registration page configured to automatically subscribe them when they complete their registration. And an unsubscribe button seemed like a good idea. The end result of all this was the following template code which you can use in any WSN script as of 10.3.20 Beta 3:
<IF {THISMEMBERISREGISTERED} and {THISMEMBERNOTIFYOFLINKS} is yes>
<div class="addnewblog"><a href="index.php?action=unsubscribelistings" class="btn btn-info btn-lg"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> {LANG_GENERAL_UNSUBSCRIBEEMAIL}</a></div>
<ELSE>
<div class="addnewblog"><a href="index.php?action=subscribelistings" class="btn btn-info btn-lg"><span class="glyphicon glyphicon-cloud-download" aria-hidden="true"></span> {LANG_GENERAL_SUBSCRIBEEMAIL}</a></div>
</IF>
I noticed the blog theme, and so presumably other upgraded old themes as well, had a repeating pattern of magnifying glasses in the search input background due to the CSS rule #searchbox input { background-image: url('../images_blog/search.png'); } in the stylesheet. I think that was originally meant to be just shown on the left side of the input once and the base.css rule that made it only appear once must've been removed at some point after the idea was dropped from the main stylesheets. But it doesn't look particularly good anyway, so I've made today's 10.3 beta remove the line from stylesheets.
Also expanded the "name for listings" option so that it applies to emails and redirect messages now, so that there's no need to edit all the email text to get it to say blog instead of listing.
Within the blog templates, I moved the calendar widget up top and changed the RSS button. You can use the calendar widget in any script, if it's useful for you to embed a calendar where each day links to a search page showing the listings added on that day. I think I'll move the calendar widget PHP into a native function shortly too, so that it'll be easier to maintain. Edit: I'll go with {FUNC_LISTINGSTHISMONTH} for it, and get it into beta 3
By Paul
Dec 09, 2018 pm31 9:24 PM (Edited )
The main change I wanted to make was to add a simple subscription button. It's much better for a blog to have a button to click on the front page for members to subscribe to email notifications of all new blog entries, instead of expecting people to edit their profile and set "Notify of all new blogs" to "yes". To do this I had to change the backend to make it possible to subscribe with a click. And then it seemed like a good idea to have the button available to guests too, by making it take them to a registration page configured to automatically subscribe them when they complete their registration. And an unsubscribe button seemed like a good idea. The end result of all this was the following template code which you can use in any WSN script as of 10.3.20 Beta 3:
<IF {THISMEMBERISREGISTERED} and {THISMEMBERNOTIFYOFLINKS} is yes>
<div class="addnewblog"><a href="index.php?action=unsubscribelistings" class="btn btn-info btn-lg"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> {LANG_GENERAL_UNSUBSCRIBEEMAIL}</a></div>
<ELSE>
<div class="addnewblog"><a href="index.php?action=subscribelistings" class="btn btn-info btn-lg"><span class="glyphicon glyphicon-cloud-download" aria-hidden="true"></span> {LANG_GENERAL_SUBSCRIBEEMAIL}</a></div>
</IF>
I noticed the blog theme, and so presumably other upgraded old themes as well, had a repeating pattern of magnifying glasses in the search input background due to the CSS rule #searchbox input { background-image: url('../images_blog/search.png'); } in the stylesheet. I think that was originally meant to be just shown on the left side of the input once and the base.css rule that made it only appear once must've been removed at some point after the idea was dropped from the main stylesheets. But it doesn't look particularly good anyway, so I've made today's 10.3 beta remove the line from stylesheets.
Also expanded the "name for listings" option so that it applies to emails and redirect messages now, so that there's no need to edit all the email text to get it to say blog instead of listing.
Within the blog templates, I moved the calendar widget up top and changed the RSS button. You can use the calendar widget in any script, if it's useful for you to embed a calendar where each day links to a search page showing the listings added on that day. I think I'll move the calendar widget PHP into a native function shortly too, so that it'll be easier to maintain. Edit: I'll go with {FUNC_LISTINGSTHISMONTH} for it, and get it into beta 3
Views | 129 views. Averaging 129 views per day. | ||||||||
Similar Listings |
|
Sorry, you don't have permission to post. Log in, or register if you haven't yet.
Please login or register.