Does website like wix or weebly are multisites system? - web-hosting

I'd like to know how websites like wix.com or weebly.com are hosted?
Does each website build on their system are hosted independently? Or are they sharing the same code like a Wordpress multisite system?
Thanks.

WIX is a bit like wordpress. Your code will be generated by referencing templates that they have created. Then when you are editing it, you are pretty much just changing the CSS. Even adding new items on the page etc is just adding another div for that element, that you then style with CSS.
If you look at the source code of the pages its quite ugly, because all the styles are mostly hard coded and not fluid. But hats off to them for creating such an easy system that's so easy to use.
A wix site relies on their systems so you can never self host it. Unless you want to get hacky with fairly unmanageable code, due to not having their editor.

Related

Web Scraping for specific content

I am trying to scrape content from shopping sites then save it on my database in table Product. Scraping such content require to know the DOM structure of each site. Not only DOM Structure, but also the hierarchy of categories in the menu.
There are many solutions to achieve that by setup a configuration for each site, then look for specific html elements that contains (ex product name, price ,model,...) using regx, XPath or css selectors.
Is there any solution to avoid setup configuration for each site and scrape the product properties automatically?
There is a similar solutions that deal with news like Readability which looks for sequence of <p> tag and images. It is easier for news due the similarity between news site and the simple structure,
There is no magic bullet, however what you could do is use XSLT as the main "binding" between your site and your scraping program. XSLT support is built in with Html Agility Pack.
At least it will minimize the amount of work required when the site evolves or changes its structure, instead of relying only on pure procedural code. Changing XSLT (once you're used to it) text will not require compilation and is more equivalent to "configure" the system. But still, you'll have to define at least one XSLT file per target website (unless these website are built on the same software of course).
You may check this link for an XSLT example: Use HtmlAgilityPack to divy up a document
If the website that you want to scrape has no general pattern for its html structure you must configure your script for every website.
ONLY if you are lucky you don't have to reconfigure your script.
ps: in generally web scrapers build their codes from scratch.

Image and media banks for user content in Plone

This might be more of a user question rather than a developer question. but developers should be able to offer insights.
For the person creating and editing content, what's the best practice for where to store images associates with pages? (I'm referring to the Plone folder, not the file system directory).
Should it be stored inside the same folder as the content item itself? Or a subfolder within the working directory? Or a special directory writeable by all for storing images?
If you do some sort of shared image upload Plone folder, what would the permissions on that Plone folder be? Once again, I'm referring of course to the Plone folder, not the file system directory.
I see that in the site admin TinyMCE options you can configure some default paths for image uploads. How would you do it so that the user won't be overwhelmed by all the images in a common images folder? (in other words, he can see and edit only his own image uploads).
This is truly a serious weakness in Plone, in the sense there is no "Best or More Oftenly Recommended Way". As #keul highlighted, Plone is flexible enough to support almost every imaginable usecase, nevertheless I can't see much of a consensus - neither a set of common steps - to fulfill the common usecase you described, in a hierarchical-and-permissioned paradigm.
That said I recommend you to check and share opinions, feature requests and code on the second of these:
https://pypi.python.org/pypi/Products.ImageRepository
https://github.com/plone/plone.app.mediarepository
Both focus on easing the use of tags to manage the overwhelming of items you described. I believe this kind of problem would mostly arise when adding images inside TinyMCE sessions, say, adding a News item. However if you just need to update images for sections or the homepage I recommend you to take a look at collective.cover:
http://www.youtube.com/watch?v=h_rsSL1e4i4
btw I also recommend you to check these solutions for richer image handling:
https://pypi.python.org/pypi/plone.app.imagecropping
https://pypi.python.org/pypi/Products.ImageEditor
https://pypi.python.org/pypi/unweb.iptc/

Magento community extensions : should we use base theme directory?

When developing a module that will be reused outwith the scope of any one particular project i.e. using the community code pool, should I use the base theme to store my template, layout and skin files?
I am almost 100% certain that i should, but i see so many community modules using the default skin and theme directories that it has planted a tiny seed of doubt.
Yes, you should absolutely be using base/default for your community modules theme - in doing so you are utilising the fallback hierarchy Magento provides, allowing your theme to be portable and easy to extend by clients wishing to do so.
I'm not expecting upvotes for this answer, but would like to clarify on Tim and Drew's answers:
Unfortunately at the moment Magento only provides us with 3 levels of fall-back:
base/default
current_package/default
current_package/current_theme
Because 'current_package' is 'default' on standard Magento installations, you will often see extension developers place their files in 'default/default'. That is poor decision-making as it will mean the files will no longer be found when a non-default package is specified.
Obviously placing files in 'base/default' is also not the most optimal place, because in a sense you are removing the distinction between core and 3rd-party files. As others have mentioned, right now it is the only way of reliably adding your files while still allowing fallback to take place.
Fortunately, this will not be an issue in Magento 2, as these files will be part of modules instead, allowing pretty much infinite fallback.
Yes. Best practice is to create
app/design/frontend/base/default/template/your_extension_dir/
and
app/design/frontend/base/default/layout/your_extension_dir/
and put your files there.

Sharing a cshtml file with UI designer team who doesn't have .NET IDE

We are working on an ASP.NET MVC 3 project and taking advantage of Razor syntax to resolve paths and what not.
We are also employing a UI design team who is responsible for maintaining the design of our pages through the use of CSS and modifying the HTML in the cshtml pages.
The problem is, they work exclusively on Mac laptops without access to a web server or a .NET IDE.
Initially, they were just providing us a straight .html file along with a .css file and we were manually merging in their work into our ASP.NET solution (e.g., replacing paths with Razor markup, etc), but as the project grows and we become more involved, we are looking for a solution that will save us from these manual merges.
I was thinking I could create some kind include script that would rewrite the paths depending on whether the UI designers were editing the file, or the .NET devs, but this seems archaic.
Anyone out there been in this situation before?
Razor is a templating language, and a pretty small one at that. Could your UI team familiarize themselves with enough of it to deal with their own links? I'm sure they are familar with your view hierarchy since they are going to be building it, so it shouldn't be much of a leap to explain how controller and action paths work.
Razor files can be edited outside of a .NET IDE just fine...any old text editor will work since it's not like there's anything you have to compile. You could provide them with an instance that they could copy their files to via a shared drive (cifs) to test them on. I don't see any reason for your UI team to be required to use Visual Studio.
You could just rename your .cshtml file to .aspx and reload it in VS and design away. when you are done, rename it to .cshtml

What is the file contents.css in CKeditor?

CKeditor's installation instructions tell me to just unzip the whole distribution file on my webserver's production directory. But it is full of files I definitely don't want there, like source code, examples, and even server-side code in PHP. I got rid of most of these files but there is one I'm not sure about: contents.css.
I can see this file uses a lot of styles I definitely don't want to see in my site. My question is:
Is contents.css required by CKeditor, or used by default? Do I even need this file on my production site?
I suppose it depends on what you're using in CKeditor, or what you plan to use later. Personally, I'd suggest renaming the file (something like) contents.css.old and creating a new contents.css file, copy across all the styles that you think you'll need and then destruct-test your implementation of CKeditor, to assess whether you've got all the styles that you need.
Add to, or remove from, that file to get your finished version and then use that one. I'd strongly advise keeping the original version around though, for future development purposes.
To your specific questions, though:
Is contents.css required by CKeditor, or used by default?
I believe so.
Do I even need this file on my production site?
Not so far as I know, its absence will likely cause things to look a little less-pretty, though, until you apply your own styles.
As suggested, above, though, I'd rename the original and then create your own stylesheet with the same name, it's rather easier than going through all the various js files looking for, and changing as appropriate, references to contents.css.

Resources