php, coldfusion and general web development waffle
Goto page Previous  1, 2, 3 ... , 9, 10, 11  Next
 
Post new topic   Reply to topic    Couchtripper Forum Index -> Tech news, tips and help
View previous topic :: View next topic  
Author Message
faceless
admin


Joined: 25 Apr 2006

PostPosted: Mon Jul 07, 2014 6:08 pm    Post subject: Reply with quote

wow, that's some going!
Back to top
View user's profile Send private message Send e-mail
Brown Sauce



Joined: 07 Jan 2007

PostPosted: Tue Jul 08, 2014 2:13 pm    Post subject: Reply with quote

Didn't have to be that much of a hacker to get in then. I bet there are lots of similar sites.

I don't envy you the cleanup job ..
Back to top
View user's profile Send private message
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Tue Jul 08, 2014 2:37 pm    Post subject: Reply with quote

luckily i'm just redoing the whole thing from scratch using coldfusion/mysql. i haven't used asp really since the late 90's, and have no intention of starting again!
Back to top
View user's profile Send private message
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Mon Jul 14, 2014 3:03 pm    Post subject: Reply with quote

can anyone see how to grab the background videos from this site?

http://www.calm.com/

i can grab the audio, but its the video i want and i can't see where they're at!

scrap that - just found them! Smile
Back to top
View user's profile Send private message
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Sun Sep 07, 2014 10:47 pm    Post subject: Reply with quote

great jquery table plugin here

http://datatables.net/

you can sort, show however many records, shows next / previous, has responsive features and you can search entries
Back to top
View user's profile Send private message
faceless
admin


Joined: 25 Apr 2006

PostPosted: Mon Sep 08, 2014 1:04 am    Post subject: Reply with quote

that's nice, cheers
Back to top
View user's profile Send private message Send e-mail
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Mon Oct 06, 2014 2:57 pm    Post subject: Reply with quote

great little tool here for converting an ms access database to mysql

http://www.bullzip.com/products/a2m/info.php

saved me loads of time Smile
Back to top
View user's profile Send private message
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Thu Oct 16, 2014 5:57 pm    Post subject: Reply with quote

i'm redoing a page on a site at the moment, and i think i might be approaching it all wrong, so i thought i'd post it up to see if anyone else can think of alternative solutions ...

i've got a table, the headers 'cold water corals, environmental assessments' etc are actually page titles, and pages/headers can be added/removed etc. the main sections like 'ecological disturbance' and subsections like 'fish' can again be added/removed. theres numerous sections and subsections under those.

the numbers are reports/documents on the relevant page. so for fish, the numbers are reports/documents on the environmental assessments page. i'm redoing this page so that instead of just showing the numbers, you'll be able to click on any number and it'll display the correct report/document in a little modal window.

also, so this works correctly, where a range of numbers is displayed like '15 - 18' it will display '15, 16, 17, 18'



so far so good, all easy. at the moment that table is just basic html, so overtime errors happen, report/document numbers change and they don't get updated in the table, or the table lists reports/document that don't actually exist on the relevant page. so i'm going to generate it all from a database so everything is tied together, you remove a report/document, it gets removed from the table etc, you add a report/document to the table, the correct link to that report/document is automatically generated instead of a user manually inputting it.

the problem comes when i think of the ways to generate all this from a database. i'm just kinda stuck. the solution i thought of initially would require so many queries that i think there must be a more efficient/better way of looking at this.

i thought you'd need a query to determine which pages to include as headers, then a query to get the sections and subsections, then - and this is where it'll goes wrong - as you go through each subsection/page combination/cell you'd need a query to retrieve any data for that cell/subsection-page combination, but for this one table that would require over 200 individual database queries! you get a few people running that page, shits going to melt down!

is there a more efficient way of doing this?! what am i missing?!
Back to top
View user's profile Send private message
faceless
admin


Joined: 25 Apr 2006

PostPosted: Fri Oct 17, 2014 12:38 am    Post subject: Reply with quote

in php/sql, you would set each cell to display the contents of the relevant database entries. I've never found a way to do it in html
Back to top
View user's profile Send private message Send e-mail
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Fri Oct 17, 2014 11:24 am    Post subject: Reply with quote

how would you do that in php? i mean, if you can do it in php i should be able to do it in coldfusion, the database is mysql - and i can work the database for this however i need to

at the moment i have a table that contains the pages to include as headers, the sections and subsections, and then content for the table, and of course the reports/documents table

the content table contains the unique id for each report/document, and the unique id for the section/subsection and page/header its linked to/should be displayed in. note, that there can be multiple entries per cell, so in the fish/environmental assessments example, there would be 13 entries to cover all the numbers ( documents/reports ) needed to be displayed

so a basic example;

dbtable: pageHeaders
id = 1 / title = "cold water corals"
id = 2 / title = "environmental assessments"
id = 3 / title = "marine mammals"
etc

dbtable: sections
id = 1 / title = "ecological disturbance"
id = 2 / title = "other"
etc

dbtable: subsections
id = 1 / sectionsid = 1 / title = "birds"
id = 2 / sectionsid = 1 / title = "coastal flora / fauna"
id = 3 / sectionsid = 1 / title = "fish"
etc

dbtable: content
id = 1 / reportid = 800 / subsectionid = 3 / pageheadersid = 2
id = 2 / reportid = 801 / subsectionid = 3 / pageheadersid = 2
id = 3 / reportid = 802 / subsectionid = 3 / pageheadersid = 2
id = 4 / reportid = 803 / subsectionid = 3 / pageheadersid = 2
id = 5 / reportid = 804 / subsectionid = 3 / pageheadersid = 2
id = 6 / reportid = 805 / subsectionid = 3 / pageheadersid = 2
etc

dbtable: reports
id = 800 / fileid = 1000 / reportnumber = "2" / description = "The 156pp report has a substantial annex on potential impacts on the marine ecology, water quality and fisheries"
id = 801 / fileid = 1001 / reportnumber = "4" / description = "Potential impacts centre mainly on seabed disturbance and water quality resulting from jetting."
id = 802 / fileid = 1002 / reportnumber = "5" / description = "Contains a rigorous assessment of [1] potential environmental impacts resulting from cable laying and post-laying operations, and [2] mitigation of any impacts."
etc

see i could do it if this wasn't displayed in the table, you could do the query selecting what you need linking each unique id with its source db table, group the query by page/section and subsection. sorted. but do it in a table, so you gotta go down and across, its confusing me!

i just can't figure it out unless i run a crazy amount of queries and that can't be right ...
Back to top
View user's profile Send private message
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Wed Oct 22, 2014 6:55 pm    Post subject: Reply with quote

so ... although i haven't actually done this ( had to move on to other things ) i think i've found a way of working it ...

i never realised, but you can do a query on a query! this is like revolutionary to me - theres so many bits of code i could make more efficient now!

i see you can do it in coldfusion and php, so probably you can in every language.

so i'm thinking i'll just do one big query to get everything.

then one other query on the query getting the count of pages/headers - or even just keep a count when outputting them, them output everything else through grouped output, but keeping track of where you are in the table, because say for cold water corals/birds - that won't bring back any records, so just keep track of where you are in the table and what your current record set has to display, if the records don't belong where you are, then its a blank cell to display, move on displaying blank cells until your current record set item is where it should be displayed ( which is why you have to order and group the query and output )

or something like that anyway, i think it'll work Smile

thinking more about it, you don't even really need the query on a query in this case, you can just set a count, but that whole query on a query thing is amazing to me!
Back to top
View user's profile Send private message
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Tue Nov 25, 2014 6:58 pm    Post subject: Reply with quote

does anyone know how to do something like they do in flickr to display images?



they change the height so they can fit them in perfectly across the width of the screen, its really nice, but i don't know how they've done the calculations for the height based on the width of the images and the space available to them. its even responsive down to a certain size.
Back to top
View user's profile Send private message
Brown Sauce



Joined: 07 Jan 2007

PostPosted: Sat Nov 29, 2014 1:51 pm    Post subject: Reply with quote

Might be using CSS3 object-fit and object-position properties.

https://dev.opera.com/articles/css3-object-fit-object-position/

And or with cropping ..

http://css-tricks.com/crop-top/
Back to top
View user's profile Send private message
faceless
admin


Joined: 25 Apr 2006

PostPosted: Sun Nov 30, 2014 2:30 am    Post subject: Reply with quote

There are wordpress plugins that do that sort of thing. I say that having just made a pretty nice new site for a charity though... and realised just how much you can do if you pay for the right theme and associated page designers.
Back to top
View user's profile Send private message Send e-mail
luke



Joined: 11 Feb 2007
Location: by the sea

PostPosted: Sun Nov 30, 2014 7:31 pm    Post subject: Reply with quote

i think there must be some server side stuff going on to work things out initially, as well as then css and jquery client side

the height of the rows are all different, in the example i'm looking at theres all sorts; 269, 287, 306, 318, 321, 330 etc, and these are set initially in the html, then changed with jquery to handle the responsiveness to resize things or move images down a row

its really well done, but i've no idea how to go about achieving it
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Couchtripper Forum Index -> Tech news, tips and help All times are GMT
Goto page Previous  1, 2, 3 ... , 9, 10, 11  Next
Page 10 of 11

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Couchtripper - 2005-2015