Upgrading old version of an OSSN site and theme...

Kevin Brown Posted in Theme Development 1 week ago

I mothballed a project I did a few years ago using OSSN and the Fakebook theme.

It was heavily modified, but worked brilliantly.

I recently decided I wanted to have a stab at it again, but haven't been able to get my old backup of the site and sql working. I suspect its likely a combination of PHP versions and the fact I no longer have the ossn_data folder :'(

However, I thought i'd try installing the latest version of OSSN and get my old theme working.... no dice.

Looking at the theme folder structure - it seems to have undergone a complete re-write.

The themes folder has OSSNTHEME.PHP and OSSNTHEME.XML which didnt exist in my old theme folder - and the folder structure is not recognisable.

Is there a suggested guide for converting old themes to the newer format?

Perhaps if I could get an old version of OSSN and try to get my old site up and running, and then run the upgrade process to bring OSSN up to date - would that also update the Themes?

I spent so much time working on it last time, I would hate to have to start again from scratch :(

Any suggestions appreciated,

Thanks in advance

gb Kevin Brown Replied 1 week ago

Ok thanks ZMan. That must mean that my archive is not complete - so the problem is mine and not an issue with the ossn upgrade :(

Yes it looks like I'll have to do a lot of grepping.

Thanks for your advice.

German ~Z~ Man Replied 1 week ago

Looking at the theme folder structure - it seems to have undergone a complete re-write.
The themes folder has OSSNTHEME.PHP and OSSNTHEME.XML which didnt exist in my old theme folder - and the folder structure is not recognisable.

It may sound a little silly, but are you sure you're talking about Ossn?
I mean, even Ossn 1.0 came with those two files ossn_theme.php and ossn_theme.xml.
Thus, if they're missing in your archive, either this archive is broken or it's something completely different.

Anyway, since YOU know best why and where you changed/added some code I'd suggest to start with a copy of a current theme that comes close to your old one and apply your changes again.
With a little grepping inside the new code it can't be that complicated to find the right locations.

gb Kevin Brown Replied 1 week ago

Ok. So I understand I am pretty much on my own here.

I appreciate this is open source, I was just hoping there would be some documentation about the new theme structure, so that people that had built their own themes in older versions of ossn could successfully update their themes for the newer versions.

I'm not asking for anyone to fix things or do anything for me, I would just like to understand the fundamental changes that were made to the way the system runs so that I can ensure that what I create going forward works correctly.

Is there any documentation on the structure of the themes?

The "how to design a theme" wiki article seems to consist of advice to complete beginners (always work on a backup, don't apply changes to a production server without testing, how to make a copy of a theme)... There is actually nothing the document at all explaining how to develop a theme? Ie what files and folders should exist, what each files does, what dependencies on the ossn core version are.

I'm happy to own my changes and do the development myself, but would like to avoid getting into the same situation again in the future, so any documentation would be greatly appreciated.

German Arsalan Shah Replied 1 week ago

Actually this is open source you are free to do anything but when you modify stuff and wanted to upgrade everything is overwritten during upgrade,

To resolve this issue you can either create your own component that overrides the files and your own theme (you can fork current component/theme and write own which is actually a modification).

2.x and 3.x have some vulnerabilities and we don't keep those versions public anymore,

gb Kevin Brown Replied 1 week ago

Ok sure, I'm fully aware about not modifying core files. The same principal applies across WordPress and Joomla which I've also done a lot of work with. I wouldn't normally consider the Theme as part of the core though? If that is the case, are you saying that basically nobody should be making any changes anywhere, and just use the Themes as they are provided?

Ok so if I was to start all over again (because I really like what you guys have built here), is there a way of creating a child theme similar to in WordPress? So the original theme stays intact, with my own changes being applied on top?

Or is there a best practise guide that you can point me to so I know the safest way to implement my own modifications?

And lastly, is it possible to get an older version of OSSN so I can figure out if I can salvage anything? I think it was OSSN 2.5 or something around that.


German Arsalan Shah Replied 1 week ago

Kevin, i am afraid we can not provide any solution for upgrade because its mentioned here to not to modify files if you do you are your own https://www.opensource-socialnetwork.org/wiki/view/704/should-i-modify-core-files

You should look for ossn_data folder in your deleted files folder in case you using cpanel. if you don't have that i am afraid you can not recover the users data.

Further we don't know exactly which old version you are using.