How can I automatically display specific header images depending on the current month? - dynamic

Thanks in advance for any help or suggestions :)
I am using the latest version of WP with the Colormag theme. I have 12 different banner images - a specific one that is themed for each month of the year and want to automatically display the correct one depending on the current month.
The Colormag theme lets me upload multiple banner images and allows me to manually select the one I want to use but I can't see any way to automate this selection programmatically.
I have looked through multiple plugins but the only seem to allow different headers on different pages etc., nobody seems to have released one that allows any form of basic selection criteria to be used to determine which image to show.
I assume it can be done with php (maybe css?) but I'm only an amateur, doing unpaid volunteer work for this organisation (an purely funded by donations animal shelter). I have a grasp of the basics - I have done some simplistic css customisation on the site and am using various plugins but but no more :(.

Related

How to supply data for search bar suggestions

Basically I'm working on my personal project, and I'm building a react native app that serves a very similar purpose to that of eBay's or Gumtree or the like. Users can obviously search for a product, I want to show search suggestions based on what the user types. Search engines usually show suggestions based on what is also being searched by other users, or what data is already is already posted on the site.
Since this is a personal project neither of those two cases apply. I need a way to still provide suggestions to user searches.
One way I tried doing this, is by finding a txt file with a bunch of product names and filtering through that based on user search.
I tried doing the same approach but by using an API instead of a text file.
I couldn't find any resources for either of those 2 methods, so I don't really know what to do
Any suggestions or references to material would be greatly appreciated!

Add pages and products to ongoing theme under development for an existing shopify store

I have an active running shopify store, I need to upgrade it to a new theme.
First need to add pages and products in the new theme in development phase which should only go into the new theme that I am working on to develop and should not disturb the existing store. When all the product and pages for the new development theme are done I would expect to publish it.
What would be the best approach to go with this?
As currently when I go to customize the other theme it doesn't let me add specific products/ pages for that theme only.
Long story short, you can't.
If you like products to be visible to a specific theme only you will need to create a separate dev store or create hidden product ( not visible to the Online Store channel ).
For the pages is not a big problem since if you don't link ( and your search don't look for pages as well ) to them it will be hard to someone to enter then.
This is a common issue - youre doing an overhaul but don't want to disturb current business. Sure on Plus this is made easy ( If you are on plus, ask your MSM for a new dev shop and use the Transporter app ) but for non-plus stores, it can be a headache.
There's no cut and dry answer but here are some ways to get the job done.
Create your dev theme and start doing your work there, as you're doing.
For pages, as mentioned by drip's answer, don't link them and you should be fine. If you don't want search engines to index these while you're working on them, you can also add some liquid logic to your layout/theme.liquid and add the pages you don't want and have it add a meta no-index tag.
If your products are being completely reformatted, i.e. new description formats and such, create one product that has the new formatting, then export your CSV and add the new formatting in there. If you do this, be sure to export again and update your inventory values in your newly formatted sheet since they have likely changed since your export and when your new product formatting is done.
If you have new products you want to hide - give them a special product type, lets say hidden. In your smart collection rules - Type allows a 'not equal to' so set that there and also use the same no-index meta so google isn't indexing them until your ready.
Main things are - your new content can be 'live' in Shopify but if there's no where on site to link to it, its pretty safe unless someone guesses the url. then just make sure you add a band-aid so Google doesn't index them. This can also be extended to your sites search, a bit more work there but 100% doable.
The last bits that are 'always on' like your navigation - that you map all out and hustle on. Or make a new nav with a new handle and use that.
Best of luck! Have done many massive overhauls of sites and product data all while the site is live, just need to use a little finesse to work around some of the things specific to Shopify.

Request for Existing Source Code on Defect Trend App

I started modifying/developing Rally apps about a week ago using the existing Rally apps provided on the Github repository so far. However, for one of my final tasks I've been asked to recreate a tailored Defect Trend Report App and unfortunately, the source code is not available for the App. I tried to start from scratch but I've ran into numerous errors and am a bit overwhelmed.
I was wondering if anyone had the src code for the app or knew of a way to extract the src code from the existing app. Of course if there is custom code that an individual has worked on that could also help me progress in this process and wouldn't mind sharing it, that'd also help a ton.
I saw that there were a few snippets that could be used from the Hackathon repo, but they're not quite on the mark of what I want to do with the app. I'm just trying to have the existing app filtered by delivery versions (currently filtered by iteration/release).
All help is greatly appreciated.
Thanks fellas!
There is an example of a 'bare metal' chart app in the App SDK 2.0 docs. It should give you the basics on how to do a chart.To get to it, go to the help pages (click on avatar in top right corner) and search for "Rally App SDK"
After that, you need to work out how to select defects from the various releases and do a count of each. There are two ways to do this:
Get all defects in the project you are in (don't forget whether you need to scope down to child projects too) and then do something like _.uniq() on the release field to find the list of releases (or do another request to get all the releases into a different store and use that for names and a count).
Get the releases and then for each release request the related defects.
If you do ask for child projects, you will need to handle all the scenarios of different releases for different projects - can get complicated!
#1 is effectively one big fetch, #2 may be many smaller ones.
You may want to decide whether to count all defects, sum the estimates, ignore those not finished, etc., etc.

Structured data in Joomla

I'm currently developing a back-end for chefs at various restaurants to report their daily menues in a structured format. Of pragmatic reasons have I chosen to use a web CMS and use many of the features already include including a flexible rights-management module
I want to utilise the existing functions in Joomla for access control, editing and navigation, but I need to replace the textfield with five field (each representing one day of the working week) and save this in a structured way into the database. I was planning to create a editor plugin which displays the field for the chef-users and parse the in-data into a structured data-format e.g. XML. For each week I will need to create empty templates for all the restaurants displaying the week number and dates.
I was also hoping for third-party developers to access this data through RESTful methods in the URL where the structure could be something like: http://domain.no/restaurant-name/menu for a text-menu http://domain.no/restaurant-name/json for json etc.
I guess my question is how I can start developing such features. Has there been developed anything similar and are there modules developed for Joomla which I can utilise? Does my approach sounds sensible or are there any other good way of solving my problem?
For a custom content management i would use Zoo component from Yootheme (not free!). You can define your fields,
But for developers access, i have no idea, sorry!

How to decide whether to split up a VB.Net application and, if so, how to split it up?

I have 2 1/2 years experience of VB.Net, mostly self taught, so please bear with me if I seem rather noobish still and do not know some of the basics. I would recommend you grab a cup of tea before starting on this, as it appears to have got quite long...
I currently have a rather large application (VB.Net website) of over 15000 lines of code at the last count. It does not do retail or anything particularly complex like that - it is literally just a wholesale viewing website with admin frontend, catalogue / catalogue management system and pageview system.
I don't really know much about how .Net applications work in the background - whether they are all loaded on the same thread or if each has its own thread... I just know how to code them, or at least like to think I do... :-)
Basically my application is set up as follows:
There are two different areas - the customer area and the administration frontend.
The main part of the customer frontend is the Catalogue. The MasterPage will load a list of products but that's all, and this is common to all the customer frontend pages.
I tend to work on only one or several parts of the application at a time before uploading the changes. So, for example, I may alter the hierarchy of the Catalogue and change the Catalogue page to match the hierarchy change whilst leaving everything else alone.
The pageview database is getting really quite large and so it is getting rather slow when the application is first requested due to the way it works.
The application timeout is set to 5 minutes - don't know how to change it, I have even tried asking this question on here and seem to remember the solution was quite complex and I was recommended not to change it, but if a customer requests the application 5 minutes after the last page view then it will reload the application from scratch. This means there is a very slow page load whenever it exceeds 5 minutes of inactivity.
I am not sure if this needs consideration to determine how best to split the application up, if at all, but each part of the catalogue system is set up as follows:
A Manager class at the top level, which is used by the admin frontend to add, edit and remove items of the specified type and the customer frontend to retrieve a list of items of the specified type. For example the "RangeManager" will contain a list of product "Ranges" and will be used to interact with these from the customer frontend.
An Item class, for example Range, which contains a list of Attributes. For example Name, Description, Visible, Created, CreatedBy and so on. The form for adding / editing loops through these to display relevant controls for the administrator. For example a Checkbox for BooleanAttribute.
An Attribute class, which can be of type StringAttribute, BooleanAttribute, IntegerAttribute and so on. There are also custom Attributes (not just datatypes) such as RangeAttribute, UserAttribute and so on. These are given a data field which is used to get a piece of data specific to the item it is contained in when it is first requested. Basically the Item is given a DataRow which is stored and accessed by Attributes only when they are first requested.
When one item is requested from a specific manager is requested, the manager will loop through all the items in the database and create a new instance of the item class. For example when a Range is requested from the RangeManager, the RangeManager will loop through all of the DataRows in the Ranges table and create a new instance of Range for each one. As stated above it simply creates a new instance with the DataRow, rather than loading all the data into it there and then. The Attributes themselves fetch the relevant data from the DataRow as and when they're first requested.
It just seems a tad stupid, in my mind, to recompile and upload the entire application every time I fix a minor bug or a spelling mistake for a word which is in the code behind (for example if I set the text of a Label dynamically). A fix / change to the Catalogue page, the way it is now, may mean a customer trying to view the Contact page, which is in no way related to the Catalogue page apart from by having the same MasterPage, cannot do so because the DLL is being uploaded.
Basically my question is, given my current situation, how would people suggest I change the architecture of the application by way of splitting it into multiple applications? I mean would it be just customer / admin, or customer / admin and pageviews, or some other way? Or not at all? Are there any other alternatives which I have not mentioned here? Could web services come in handy here? Like split the catalogue itself into a different application and just have the masterpage for all the other pages use a web service to get the names of the products to list on the left hand side? Am I just way WAY over-complicating things? Judging by the length of this question I probably am, and it wouldn't be the first time... I have tried to keep it short, but I always fail... :-)
Many thanks in advance, and sorry if I have just totally confused you!
Regards,
Richard
15000 LOC is not really all that big.
It sounds like you are not pre-compiling your site for publishing. You may want to read this: http://msdn.microsoft.com/en-us/library/1y1404zt(v=vs.80).aspx
Recompiling and uploading the application is the best way to do it. If all you are changing is your markup, that can be uploaded individually (e.g. changing some html layout in an aspx page).
I don't know what you mean here by application timeout, but if your app domain recycles every 5 minutes, then that doesn't seem right at all. You should look into this.
Also, if you find yourself working on various different parts of the site (i.e. many different changes), but need to deploy only some items in isolation, then you should look into how you are using your source control tools (you are using one, aren't you?). Look into something like GIT and branching/merging.
Start by reading:
Application Architecture Guide