You are not logged in.

Announcement

Forum database was corrupt and an old backup was restored as temporary replacement. Registrations closed until the database is recovered. Please ask questions using the Contact form

#1 25-04-2013 09:48:34

rmatveev
Contributors
Registered: 24-04-2013
Posts: 32

Tiles creation by JS (v3) vs PHP (v4)

Reading the docs for v4 I noted that all tiles should be created in PHP file. But in the same time v3 uses tiles.js file to set up ones. Theoretically v3 approach gives to webmaster the ability to create the tiles upon some events (button pressing, date update...).
I thought that it could be a good idea to not only CREATE the tiles during site operation but also DELETE or MODIFY them. Is it possible with V3 or V4?
If the tiles will be created by PHP (on a server side) there will be no any possibility to give to webmaster such possibility (as I can understand).

Let me give you a short example I'd like to implement: one of the tile has some inputs and a button "Show recent addresses". By the pressing of this button I'd like to delete some tiles beneath and create a new one big tile with recent addresses. After user will pick the address he need this big tile destroyed and the older tiles should be restored on its place. Is it possible to implement?

Thanks!

Offline

#2 27-04-2013 13:06:03

Thomas
Administrator
Registered: 10-03-2013
Posts: 897

Re: Tiles creation by JS (v3) vs PHP (v4)

Hello,

you could generate them when the website is loaded but hide them setting their "visibility" to "hidden", using javascript with this code (didn't test):
$.plugin($beforeTilesShow,functions(){
hideTiles:function(){
$(".hiddenTiles").css("visibility",hidden");
}
});

. When you need them, set it to "visible" using javascript.

You can change the content of the tile using javascript/jquery. ( $(".element").html("new content"); )

Offline

#3 28-04-2013 08:25:04

rmatveev
Contributors
Registered: 24-04-2013
Posts: 32

Re: Tiles creation by JS (v3) vs PHP (v4)

Thomas, that is a great idea! Thanks!

Offline

Board footer

Powered by FluxBB