php, coldfusion and general web development waffle

for all net-related stuff
User avatar
luke
admin
Posts: 5653
Joined: Sun Feb 11, 2007 5:32 pm
Location: by the sea

Post by luke »

yeah it would make things easier without spaces, it was something i was concerned about when i moved to linux, but apart from this everything has worked ok

i used coldfusion to find out the ascii value of the weird space character, which brings it back as 65533, which is apparently known as a replacement character ( https://en.wikipedia.org/wiki/Specials_( ... _character ) which is 'used to indicate problems when a system is not able to render a stream of data to a correct symbol' whatever that means in this case!

the server people see it as \240

Image

i think i might just have to manually rename all the dodgy files this time and hope there was just something weird with this cd/dvd ...
User avatar
luke
admin
Posts: 5653
Joined: Sun Feb 11, 2007 5:32 pm
Location: by the sea

Post by luke »

so i'm a few years behind, but i'm finally getting around to trying to update my sites so they're responsive and will work on mobiles/tablets/touchscreen/laptop/desktop

mostly its been fine, media queries are great, i've got pages full screen from my desktop to a mini mobile, navigation menus change to mobile friendly menus at set sizes, side menus drop below content, all good

then i noticed a problem ... its not really a responsive issue, and its always been a possibility, i'd just never noticed it before

this is how things should be;

Image

but if a menu 0 option is too near the right edge of the screen, any dropdown menu from that displays off the screen

Image

i have one site that has loads of menu options, and without setting the width, you never know where any one option will end up

in css you can display the dropdown to the left or right, but - and this is the problem! - you can't choose to display it left or right depending on its location and available screen width!

so in the second picture, menu 2 is ok, but menu 3 should display to the left

i've been googling this problem all day, i thought there must be a solution to this - a premade jquery menu or something, but i've found nothing

anyone else ever come across this? anyone found a solution to it?! any ideas on one?!

i'm trying to work on some jquery at the moment to work out based on postition and screen width if it should display left or right, and then change the css to display left or right, but its a nightmare. i've kinda got it working one level down, but anything further and it all goes to shit :(
User avatar
faceless
Posts: 27009
Joined: Tue Apr 25, 2006 6:16 pm

Post by faceless »

I'd say it's just too many levels really - maybe add more base topics so there aren't as many branches?

although, how about one like the side nav here? That should sort it
User avatar
luke
admin
Posts: 5653
Joined: Sun Feb 11, 2007 5:32 pm
Location: by the sea

Post by luke »

actually there isn't that many levels in reality, thats just an example

in reality, menu 1 can display partly off screen if the menu 0 option thats its under is near the edge of the screen

edit

i've just knocked this up quickly to demonstrate better;

Image
User avatar
luke
admin
Posts: 5653
Joined: Sun Feb 11, 2007 5:32 pm
Location: by the sea

Post by luke »

i was going through the error logs for a few sites today and kept noticing missing calls to a 'apple-touch-icon.png' ( and variations of )

turns out ipads and iphones don't use the favicon.ico file. if a png isn't specified for them on the page it'll look for few variations of apple-touch-icon.png

details are here and i found a handy little generator here

on the subject of error logs, i often get 404's for various backend pages - wp-login.php, /admin/, /administrator/, /wordpress/, /login/ etc, does anyone else get those?!
User avatar
faceless
Posts: 27009
Joined: Tue Apr 25, 2006 6:16 pm

Post by faceless »

that's handy about the icon thing, ta.

Those 404s probably come from scripts that are scanning as many areas as they can, looking for a way in. Usually spammers.
User avatar
luke
admin
Posts: 5653
Joined: Sun Feb 11, 2007 5:32 pm
Location: by the sea

Post by luke »

i was looking into this and was checking for any alternatives and found this;

https://tablesorter.com/docs/

an extra function this allows is sorting by multiple columns which is pretty cool. if you download the latest version from https://github.com/christianbach/tablesorter it also allows the ability to sort by a value thats not displayed like sorttable does which i need

i've also been looking into different methods of displaying tables that are responsive and found this;

https://elvery.net/demo/responsive-tables/

and

https://css-tricks.com/responsive-data-table-roundup/

also i know faceless you redid the top of the site to work on ipads etc, i was testing my responsive stuff on a mates android phone over the weekend ( i haven't got a smartphone or tablet to test on yet, and my touchscreen laptop died at the start of the year ) and your dropdown menu ( and all my current stuff! ) might be a bit fiddly ...

because the top level items 'FORUMS COOL DOCUMENTARIES LIVE STUFF FUNNY GAMES SOCIAL MEDIA' are all links, when you tap to open the dropdown, it might change page ( they all seem to go to https://couchtripper.com/forum2/ ). if you remove the top level links ( or void the link like javascript:void(0); or use a # as the link instead) , the dropdown will open ok. presently if you tap and keep it pressed, you can open the dropdown - and when you lift your finger that then registers as the click, which can be a bit fiddly if you're trying to move about or want to open a different menu.

it might work differently on different devices though, and windows tablets from what i read need something different altogether!
User avatar
faceless
Posts: 27009
Joined: Tue Apr 25, 2006 6:16 pm

Post by faceless »

ah right, I didn't know that, ta. I'll sort it later

One other problem is that on certain topics the dropdown is overlaid by video, which means the links aren't acessible. Stupid bloody computers!

I'll take a look at the other script, but I don't think I need it just now.

edit - I just tried to fix the problem, but it didn't work as it should.... I'll keep at it
User avatar
luke
admin
Posts: 5653
Joined: Sun Feb 11, 2007 5:32 pm
Location: by the sea

Post by luke »

if the video is flash, i had that problem once with a site with a flash intro where the dropdown was behind the flash, i think you can fix it with the line;

param name="wmode" value=""

from my old code i set the value as "window" for firefox and "transparent" for everything else, i can't remember if that was to cover a bug in firefox or what now ( that was some years ago now so maybe its the same for all of them ) ... but its the wmode parameter you want

thinking though, that might not work in this instance because with youtube embeds and stuff i don't know how much control you have over the code ...

the alternative you might wanna look into is the css z-index, which just defines the order of stuff, something with a higher z-index will display above stuff with a lower z-index

edit - i don't know if you've fixed it, or i misunderstood the problem, but in chrome theres no problem! youtube, big brother, and the combat dealers videos all display correctly with the dropdown above them ....
User avatar
Brown Sauce
admin
Posts: 1485
Joined: Sun Jan 07, 2007 3:40 pm

Post by Brown Sauce »

Talking of error logs, I recently set up a mail server. Does that fucker get attacked or what :)

I don't think that anyone has got in, but it ain't for the lack of trying.
User avatar
faceless
Posts: 27009
Joined: Tue Apr 25, 2006 6:16 pm

Post by faceless »

Try this page, Luke - it's when the videos are near the top that the problem comes in. Which is annoying, as that's the point of editing the viewtopic file and changing it to video.

https://couchtripper.com/forum2/video.php?t=13922

Sauce, I've noticed my error log is about 250mb at the moment - I was wondering why that was, but that could be it
User avatar
luke
admin
Posts: 5653
Joined: Sun Feb 11, 2007 5:32 pm
Location: by the sea

Post by luke »

that page is alright for me

Image
User avatar
faceless
Posts: 27009
Joined: Tue Apr 25, 2006 6:16 pm

Post by faceless »

odd, but I'm not complaining. Is that on Firefox or Chrome?
User avatar
luke
admin
Posts: 5653
Joined: Sun Feb 11, 2007 5:32 pm
Location: by the sea

Post by luke »

that was chrome, i just looked at it in firefox and i see the problem now - the menu is behind the video. its the same in opera and safari, but weirdly it works ok in ie, usually its ie that causes the problems!

unless it can be sorted with z-index ( which i'm not sure if flash ignores ) i don't think there will be a solution ( except moving the dropdown above the couch logo so theres space ) - i don't know but i doubt you can edit the code that in this case daily motion uses and add that wmode parameter.
User avatar
faceless
Posts: 27009
Joined: Tue Apr 25, 2006 6:16 pm

Post by faceless »

It must be to do with firefox and those others giving videos preference in the video overlay. I'm sure there must be a reason they chose that, but I can't imagine the logic.
Post Reply