A few small changes.

News and announcements about the website and forum.
User avatar
Gumboots
CEO
Posts: 4822
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

@Hawk: our last couple of posts have vanished into the void. It went like this:
Oh dear. This is a trap for the unwary. :D

I had the idea of setting up a test site in a sub-domain. This was easy (basic phpBB install to new sub-domain). Then I wanted to import a backup of the live site as a basis for the test site.

So, I go to the nifty cPanel backup/restore page (../frontend/paper_lantern/backup/index.html) and I notice that it exports backups using the name of the relevant db for the gzipped SQL file.

Ok, that's sensible. So I look around for a way to select the db you want to import to. Nothing found.

Ok, if no controls available, assume it will import to the db that has a name matching the .sql.gz file. Can't see any other basis for it.

So, rename live site backup file to match the name of the test site db. Import file.

Success! Imports beautifully. Except: it imports to the live site db, not to the test site db.

IOW, the cPanel restore code seems to just restore to the database that is alphabetically first on the list, with no possibility of restoring to another db later in the list.

Am I missing something here?
(Copy of a support ticket, just submitted to the host's support crew. :lol: )

I've restored this site to the latest backup available. Fortunately I've been taking them every 24 hours, so we haven't lost much. And at least we know the backups are good. *!*!*!

Edit: Got cPanel figured out. When it makes a backup file it writes the name of the db it was exported from on the third line of the file. That's what cPanel reads when you try to import a file. So to import a a backup of Site 1 db to the Site 2 db:

1/ Export Site 1 db.
2/ Extract on desktop.
3/ Rename extracted SQL file to match name of second db (that you want to import to).
4/ Edit third line of SQL file to match the name of the db you want to import to.
5/ Gzip the resulting file.
6/ Import via cPanel space monkeys.
7/ Hey! It works this time. (0!!0)
User avatar
Gumboots
CEO
Posts: 4822
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

Anyway, about the having to re-do everything if the site is updated to a new version of phpBB:

It's not looking that bad. Most of the extensions just use the same old code forever, so there's no need to actually update those. All of the old files are going to be fine, so it's just disable extension > upgrade site > re-enable extension.

For the styles, still not that bad. For example, in the 3.2.7 to 3.2.8 upgrade only one of the changed files would have affected PSDE. That was viewforum_body.html, and it only required one line edited to update it. Only takes a minute. No worries. (0!!0)

------------------------------------------

I've found another trick for changing colours too. Modern browsers have this nifty thing called local storage (examples at https://alligator.io/js/introduction-lo ... onstorage/).

The set and retrieve for that is just javascript, but there's no need to ping the server to get stuff back because it's all held in the browser. The javascript for setting a new value is much the same as for doing it with a cookie. But, the code for retrieving a value from local storage seems to be simpler than the code for retrieving a cookie value, because you can just call it direct instead of having to sort through an array of everything in the dumpster. So response time should be as near to zero as makes no difference, even if your connection to the server is having a bad day. This is looking like the winner for fast and smooth colour changes. !*th_up*!
User avatar
Hawk
The Big Dawg
Posts: 6504
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: A few small changes. Unread post

I guess the forum glitch would explain why I had to login this morning (I don't log out).
As for your missing post, I have no idea how to do that with CPanel. As a matter of fact, I can't remember how I did that in DirectAdmin. :lol:

Oh wait. I just remember what I did. ;-) When I created a test forum, I didn't import the database or copy the forum. I just installed a new install of phpBB, installed the add-ons/styles I wanted to test and let a few choice folks create new accounts on it.

I went into my browser settings and unchecked the clear cache option when the browser closes. Let's see what happens.



Edit 1: Nope. Unchecking the cache option didn't change anything. There's still that half second or so delay. No biggie though.

I wonder how that local storage js stuff will work with these clearing settings?

ClearHistory.png



Edit 2: The test forum doesn't keep me logged in. Is that supposed to be? Not a big deal. I was just curious if that was intentional.

I like that favicon. :mrgreen:
Hawk
User avatar
Gumboots
CEO
Posts: 4822
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

I may have had the test forum cookies messed up. It took me a while to think that maybe I should use a different cookie name for the different site. I'll keep an eye on it and see if it behaves now. It should keep you logged in the same as this site. And yeah, I thought the favicon made sense for a test forum. :D

Edit: The test site seems to be keeping me logged in without glitches now.
I wonder how that local storage js stuff will work with these clearing settings?
Clearing cache doesn't affect local storage. Offhand I'm not sure which browser setting clears local storage, but I assume something must.

I haven't implemented the local storage thing yet. My plan is to try other optimisations first and see if I can get things smooth enough with cookies. If I can't then I'll try the local storage. My reasoning here is that a/ I already know how to use cookies and b/ if you're logged in the same cookie will work on any device (handy if you use more than one) and c/ doing other optimising makes general sense anyway so might as well do it. :)

I just had an idea about BBC for hr's too. I think I'll make an extra tag that doesn't require entering any colour, and can be called with one tag instead of two, and that will pick up styling from the style's CSS. Personally I'd find this handy at times. Could be coded something like this:

Code: Select all

/* The basic version: picks up colours from style. */
[bhr]

/* Could also make it pick up your own defined colours if you wanted to define them. */
[bhr #ffffff]
/* Would make a white one. */

[bhr red]
/* Would make a red one. */
User avatar
Hawk
The Big Dawg
Posts: 6504
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: A few small changes. Unread post

The test site still isn't remembering my login, but this site does.
Maybe it's your avatar over there. It's eating the cookies. ^**lylgh

I did check and I do have the cookies from that site.

cookie.png
cookie.png (9.81 KiB) Viewed 275305 times


It's not a big deal because my browser remembers me so it's simple enough to log in every time, and it is just a test site. I'm just reporting in case you want to know.
I tried on two different browsers; PaleMoon and WaterFox (my default)
Hawk
User avatar
RulerofRails
CEO
Posts: 2063
Joined: Sun Dec 08, 2013 1:26 am

Re: A few small changes. Unread post

Search is more useful now. Thanks.

I went on the test site a bit. It seems to keep me logged in ok. Nice pic in the PsDE header. I prefer the third (default) color with it. So maybe my preference would be based on a trivial thing like that. The 5th and 6th though are too close to pink to see myself using them.
User avatar
Gumboots
CEO
Posts: 4822
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

One thing I have found over the years is that, for some bizarre reason, women often really like pink styles. So I might leave that one as an option, just in case someone wants to use it.

It's sort of a tradition with me. Years ago I made a pink version of an existing style for a friend (coding it was a truly brain-frazzling experience) and a lot of female members loved the thing. So since then I usually include something pink in multi-variant styles, on the basis that a sizable chunk of half the population is probably going to want it, at least some of the time. In this case it was already included, so I suspect Christian (the bloke who made PSDE) was thinking along the same lines.
User avatar
Gumboots
CEO
Posts: 4822
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

I haven't made any more progress with this. I've been back into finishing another coding project that was on temporary hold, so this place has had to take a place in the queue. I'm still planning on adding some more eye candy and revamping functionality a bit, but this will probably happen after Christmas.
User avatar
Hawk
The Big Dawg
Posts: 6504
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: A few small changes. Unread post

That's good. I thought you gave up. :mrgreen:
Hawk
User avatar
Gumboots
CEO
Posts: 4822
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

Na. I'm just not trying to do everything at once. In fact I'm keen to start playing with maps and locos again too. ;)
User avatar
Hawk
The Big Dawg
Posts: 6504
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: A few small changes. Unread post

Get too many pots on the stove and something isn't going to come out right. ;-)

Tale your time. Do one thing and do it right. Then move on to something else. (0!!0)
Hawk
User avatar
Gumboots
CEO
Posts: 4822
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

Looks like I'll have to update phpBB again soon. They have a minor patch out, which should go in without much trouble, then a bigger release for supporting later versions of PHP (optional at this stage) which is likely to break things.

This is getting back to the same old "Oh hey my extensions which are supposed to save me work haven't been updated oh dear this means a/ no updated software or b/ more work". Deja vu for anyone who has done a bit of adminning. *!*!*!

Looks like I might be wanting to rationalise things a bit. I'm thinking the site menu isn't going to change much or often, so I can save an extension there by hard coding the menu into the template. Since I rewrote the HTML and CSS for the site menu anyway, there's not a lot of point in relying on an extension for it. If I use one parent style that handles all the templates, then any child styles will just inherit templating and apply their own CSS on top. Alternatively I can write one menu file, which then gets called by one of the standard phpBB events, and that can be dropped into any style. This means only coding the menu (or any other HTML and js) once, which is nice and handy and no problem with updates.

Re styles: What I think we'll end up with separate ones rather than multi-variant ones. The flash of empty pages problem is hard to get around in all conditions, and it gets worse when running light and dark variants on the one style. Ends up making more sense to use parent style and child styles for light/dark/colour variants, and skipping the fancy javascript changers in the footer.

We can still have the quick style changer up top, as long as that keeps working with phpBB version changes. If it stops working I'll substitute a quick link to UCP > Board Preferences, so anyone can get a change of scenery with a couple of clicks providing they log in to do it.

Will also look at which other extensions are actually necessary, and which extension authors are regularly active. Anything supported by the phpBB team should be good to go pretty quickly, so we can keep board announcements and collapsible categories. I think I'll try their media embed too, so we can have video and audio playable here for anyone who wants it (will not autoplay). If that causes problems with page load speed for anyone I can always disable it. !*th_up*!

Apart from the above, we currently have:
Add User
Database Optimize & Repair Tool
External Links Open in New Window
Hide Bots
Lightbox
News Scroll
Password Strength
Posting Buttons
Quoted Images as Thumbnails
Stop Forum Spam
User Merge

Would definitely want to keep External Links Open in New Window, and Lightbox.
Would like to keep Add User, User Merge, and Stop Forum Spam if at all possible.
Not fussed about the other six. Might keep them if convenient, but they're not necessary.
User avatar
Gumboots
CEO
Posts: 4822
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

I've added another extension. This one adds the ability to search a list of topics by any member. The link for it displays on their public profile page, as shown in the screenshot.

Search_users_topics.png
Search_users_topics.png (7.09 KiB) Viewed 275592 times

I'll look at moving it up a bit, so it sits directly under "Search user's posts". I'll also look at getting a "Your topics" link added to the quick links drop menu. !*th_up*!
User avatar
Hawk
The Big Dawg
Posts: 6504
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: A few small changes. Unread post

Wasn't this always there, or you saying 'by any member', does that mean it was only available to admins and mods?
Hawk
User avatar
Gumboots
CEO
Posts: 4822
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

Nope, it wasn't there before. Or at least I'd never seen it, not even on an admin account. If you want to double check, feel free to rock on into admin and temporarily disable the extension.
User avatar
Hawk
The Big Dawg
Posts: 6504
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: A few small changes. Unread post

OK! I see the difference now. It's just that one line about searching a users topics, just like you said. *!*!*! ^**lylgh
Hawk
User avatar
Gumboots
CEO
Posts: 4822
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

Had an idea. I was grumbling about the rigmarole for doing all the briefing shots for maps in the archives. With the new monitor I have, shots don't match up with the frames and masks I made before, so I'd have to make them again, and it's a lot of Photoshoppery and a lot of shots and blah blah blah.

So I dug into Highslide a bit, and it will do chunks of HTML as well as just images. This is cool because HTML will render really fast, and also text zooms well if anyone needs to zoom it (like tiny pixels on a phone or whatever). So I whipped up a proof of concept page on local, that lets me just copy/paste the map briefing from the editor, throw in a few p tags n stuff, and hey presto it comes up as a cool briefing that you don't have to go through a lot of images for.
Test_run_1.jpg
Test_run_2.jpg
There's only one image required per map, scaled for use in two places, and it's a simple low kb jpg, and it's always cached before you call up Highslide, so no download/cache times to worry about when you want to check a briefing. Result should be much quicker and easier checking of briefings, and far fewer and far smaller images required in the stash directories. And obviously the text just automatically wraps itself to suit your screen width if you have a narrow screen.

I think I'll start doing new maps this way, and slowly convert as many existing pages as I can without going nuts. *!*!*!

ETA: And for some reason the forum's Highslide doesn't like these two images, even though it's happy with every other attached image in the thread. Might be because they're bigger than its limits. Will have to check. Anyway, that doesn't affect the proof of concept thing.
User avatar
Hawk
The Big Dawg
Posts: 6504
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: A few small changes. Unread post

That looks really good too. Much better than what I was doing, and a whole lot easier and quicker.
Hawk
User avatar
Gumboots
CEO
Posts: 4822
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: A few small changes. Unread post

It does mean that all the briefing text has to go in the HTML, so a fair chunk of code on each page by the time you get briefings for a bunch of maps. The Asia page is a good test case though. It doesn't have many maps, so there aren't many entries to deal with. I should be able to set that up with Highslide, and leave the other pages on Lightbox for now.

Although really the site would benefit from a CMS of some sort. And TBH I still haven't go my head around what all those stray javascript files in cs/ are doing. Might as well get my head around them here. :mrgreen:

Ok, so in cs/js we have...

highlight.js - Called on the real world maps pages, but doesn't seem to do anything. What is it supposed to do?
ETA: Oh hang on. Got it. Browsers these days will scroll to hits and highlight them by default. I think this can be ditched.

lightbox.js - Can stay for now, but will most likely end up being replaced by Highslide.

ticker.js - I know what this does.

prototype.js - Ok, this appears to be another javascript framework. Not sure we have a use for it.

scriptaculous.js - This thing is supposed to do all sorts of stuff, but does this site actually use it?

I have no idea what the rest of them are supposed to be doing. Are these old scripts that give basic functionality to ancient browsers? Or do they still have some relevance?

builder.js - Is this related to the old uploads page?
effects.js
new_win.js

--------------------------------------------------------

Regarding directories: hb_ft_n-file and hb_sub seem to be the old upload system, so I assume those could be ditched. I think gbcf-v3 is not used anymore either.
User avatar
Hawk
The Big Dawg
Posts: 6504
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: A few small changes. Unread post

The hb_ft_n-file and hb_sub stuff could still be used. That's up to you. Here's the forum link to the discussion about using this feature.
viewtopic.php?f=1&t=2824
I set that up so folks could use that instead of adding their finished work to the forum and taking a chance of me missing it and it not getting added to the archives. It was also great for files larger then what could be posted on the forums (200 or 300 MB), which was the case back when I was hosting stuff for MSTS.
It's strictly php and uses no javascript. The script is called Simplicity of Upload. It doesn't look like it's available at the developers website any longer. http://www.phpsimplicity.com/scripts.php

The gbcf stuff can be removed. The contact page - http://hawkdawg.com/cnt.htm - was apparently removed by either you or me. That script is Green Beasts Contact Form - http://green-beast.com/gbcf-v3/ . It was very successful in stopping spam emails sent to me from the contact page.

If you still have a folder named gb, that's some old Guestbook stuff that isn't needed anymore.

The Lightbox script - https://lokeshdhakar.com/projects/lightbox2/ - uses the following js files: builder, effects, lightbox, prototype, and scriptaculous.

The highlight.js is part of Zoom Search Engine and I have no idea why it's there. I don't use it. I might have tried it once but decided against it and neglected to remove that javascript file and the associated links in the page headers.

The new_win.js is a script to open links in a new browser window instead of opening them in the current browser window. I'm pretty sue you'll find that used mainly on the archives pages.

I just had a gander at the Credits and Acknowledgements page - http://hawkdawg.com/credits.htm -and it needs some serious updating. Especially after you get done. ^**lylgh

I think that addresses all you questions. Let me know if you need any further info.
Hawk
Post Reply