New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YOURLS MultiSite #2306

Closed
TuKod opened this Issue Oct 9, 2017 · 5 comments

Comments

Projects
None yet
4 participants
@TuKod

TuKod commented Oct 9, 2017

Hi, I'm a retired computer programmer (new to GitHub, maybe too old to be writing programs, a couple dozen grandkids, one of whom is an airplane pilot!).

A couple months ago I started a project and wanted to use YOURLS in a MultiSite mode (like WordPress). But YOURLS doesn't do MultiSite, Yet! So I hacked the code and built my own. My YOURLS MultiSite Roadmap is at ** YOURLS MultiSite **

On that page, you can see a Proof-Of-Concept - some URLs that forward through this YOURLS MultiSite. I am now building this into a production site.

On that page, I have addressed these topics...

YOURLS MultiSite Roadmap

YOURLS MultiSite is a Drop-In Replacement for YOURLS.
YOURLS MultiSite Proof-Of-Concept URLs - /s/ directory.
Works for a Single-Site or MultiSites.
Give YOURLS Its Own Directory, like WordPress!
Simple and Easy Configuration.
Easy to add more Domains to MultiSite.
Simple to use YOURLS MultiSite "Advanced" Configuration.
Easy to rename /admin directory.
Works with WordPress on the SAME Domain! (No Subdirectory needed!)
Testing YOURLS MultiSite. What's Tested?
Update Readme file to be more dynamic.
Update XHTML to HTML5 standards. In Progress.
YOURLS MultiSite Production URLs - /yourls/ directory. Being Built!
YOURLS MultiSite Limitations.
Redirect YOURLS subdirectory to the main directory using .htaccess...
Plugins For YOURLS Should Work.
Tested Plugins.

These are all working now, either on my development server, or live in the Proof-Of-Concept.

YOURLS MultiSite uses about 99% of the original YOURLS code so I think it should be compatible with things like plugins.

I'm sorry if I am a little bit slow, or old, (50+ years of writing computer programs!), or don't pick up things as quickly as I did before. But if anyone would like to see/use/modify this code, or merge it into the YOURLS project (it should be a drop in fit.)

Caution: I have not done the last few YOURLS modifications for the last couple months. But I plan to!

The Proof-Of-Concept is running on shared hosting (Ubuntu) at Pair Network. You can check their site for the environment.

Anyone Interested?

Sincerely,

Pop VeKind
TuKod
(TuKod is a Filipino word meaning "Support!" It is also the NuEnglish spelling of "To Code!")

@ozh

This comment has been minimized.

Show comment
Hide comment
@ozh

ozh Oct 9, 2017

Member

Hello

It looks like an interesting project. Ideally though, you would package everything as a plugin instead of a standalone replacement that uses "99% of the original code", this would allow for future compatibility and ease of use

Also, did you check this plugin https://github.com/adigitalife/yourls-allow-aliases, it may be inspirational

Member

ozh commented Oct 9, 2017

Hello

It looks like an interesting project. Ideally though, you would package everything as a plugin instead of a standalone replacement that uses "99% of the original code", this would allow for future compatibility and ease of use

Also, did you check this plugin https://github.com/adigitalife/yourls-allow-aliases, it may be inspirational

@TuKod

This comment has been minimized.

Show comment
Hide comment
@TuKod

TuKod Oct 9, 2017

Greetings from the Philippines!

I started out to build a multisite plugin. Although most of the code stays the same, the strategic changes would mean copying most of the core functions into the plugin. Just like when WP added MultiSite. The only truly viable way was to actually replace part of the WP core. Originally WPMU was a drop in replacement for a large part of the WP core. Time proved the wisdom in this as WPMU was then merged into the WP core as MultiSite with only simple configuration from one to the other.

The same applies here, YOURLS MultiSite changes minor, but critical and strategic things, throughout the program. By design, it will work as a single site with NO configuration changes. Easy configuration changes would let the site admin add the features available for MultiSite.

Yes! I had looked at the Allow aliases for YOURLS plugin, even before I got started, as well as many other plugins.

"Aliases" simply allows you to address the same YOURLS keywords to different domains. Effectively making two URLs with different domain names that go to the same place. They both use the same MySQL Table, Making one domain's keywords to be aliases of another YOURLS domain.

Personally, I wouldn't do such a thing. Not that the sky would fall or anything like that. I am assuming each would do a 301. I just personally don't like the idea of doing the same thing with different domains, it seems wasteful. Just a preference, not saying it is wrong.

YOURLS MultiSite is not that way at all. It largely follows the WordPress MultiSite ideas (ok, I confess, I stole a lot of the idea from WP). Each Domain name is a complete YOURLS site. Like WP they use different sets of tables for completely separate sites. If you notice on ** YOURLS MultiSite ** there are six domain names configured in the Proof-Of-Concept demo. Look closely and you will see that the six examples all use the keyword "54". The same keyword in different domains, going to 6 different URLs. This produces the exact same result as loading six copies of YOURLS! Each can be totally configured separately, yet reside in one physical location on the server.

YOURLS and WordPress together!

Down the page a bit you will find a section called:
YOURLS MultiSite Production URLs
Here I am building a production model for a new project I am working on. You will notice that I am running both YOURLS and WordPress side by side in the document root of each domain.
Both YOURLS and more importantly WordPress is running independent of each other, with no restrictions on either.

Because I moved the YOURLS files to its own directory and split the site URLs from the location URLs, The location URL become self-aware for document root sites. I was able to determine the different requirements of each program and merge them to work together.

This server is actually running about 50 small WordPress sites that are spread across a half-dozen WordPress MultiSite installs. AND ONE YOURLS MultiSite running three sites now and will increase to six. You and I both know that 6 YOURLS cannot be loaded as is into one document root. Likewise, adding even one WP site or WP MultiSite would break it. However, moving YOURLS completely off the document root allows me to demonstrate multiple YOURLS and multiple WP sites doing just that.

Finally, I would be the first to say this should be considered no more than beta software. I am more than capable of maintaining my production sites and "going it alone." Although it is working perfectly in my tests, I still need to work on the documentation and upgrade the XHTML to HTML5 (minor cleanup stuff). However, YOURLS MultiSite needs more and more varied testing.

I would like more people to test with me. For example, all plugins and API need testing. After the code proves itself you then may consider merging it into the YOURLS core. Do you have a suggestion how I might proceed with this? I am just learning about GitHub so forgive my ignorance. Would it be better to branch or fork this project? I do believe YOURLS MultiSite can be merged into the YOURLS Master once it has proven itself.

I will be looking for your advice on how to proceed,

Pop VeKind

PS: A big THANK YOU for such a wonderful program. It is very useful as is and also has great future potential.

TuKod commented Oct 9, 2017

Greetings from the Philippines!

I started out to build a multisite plugin. Although most of the code stays the same, the strategic changes would mean copying most of the core functions into the plugin. Just like when WP added MultiSite. The only truly viable way was to actually replace part of the WP core. Originally WPMU was a drop in replacement for a large part of the WP core. Time proved the wisdom in this as WPMU was then merged into the WP core as MultiSite with only simple configuration from one to the other.

The same applies here, YOURLS MultiSite changes minor, but critical and strategic things, throughout the program. By design, it will work as a single site with NO configuration changes. Easy configuration changes would let the site admin add the features available for MultiSite.

Yes! I had looked at the Allow aliases for YOURLS plugin, even before I got started, as well as many other plugins.

"Aliases" simply allows you to address the same YOURLS keywords to different domains. Effectively making two URLs with different domain names that go to the same place. They both use the same MySQL Table, Making one domain's keywords to be aliases of another YOURLS domain.

Personally, I wouldn't do such a thing. Not that the sky would fall or anything like that. I am assuming each would do a 301. I just personally don't like the idea of doing the same thing with different domains, it seems wasteful. Just a preference, not saying it is wrong.

YOURLS MultiSite is not that way at all. It largely follows the WordPress MultiSite ideas (ok, I confess, I stole a lot of the idea from WP). Each Domain name is a complete YOURLS site. Like WP they use different sets of tables for completely separate sites. If you notice on ** YOURLS MultiSite ** there are six domain names configured in the Proof-Of-Concept demo. Look closely and you will see that the six examples all use the keyword "54". The same keyword in different domains, going to 6 different URLs. This produces the exact same result as loading six copies of YOURLS! Each can be totally configured separately, yet reside in one physical location on the server.

YOURLS and WordPress together!

Down the page a bit you will find a section called:
YOURLS MultiSite Production URLs
Here I am building a production model for a new project I am working on. You will notice that I am running both YOURLS and WordPress side by side in the document root of each domain.
Both YOURLS and more importantly WordPress is running independent of each other, with no restrictions on either.

Because I moved the YOURLS files to its own directory and split the site URLs from the location URLs, The location URL become self-aware for document root sites. I was able to determine the different requirements of each program and merge them to work together.

This server is actually running about 50 small WordPress sites that are spread across a half-dozen WordPress MultiSite installs. AND ONE YOURLS MultiSite running three sites now and will increase to six. You and I both know that 6 YOURLS cannot be loaded as is into one document root. Likewise, adding even one WP site or WP MultiSite would break it. However, moving YOURLS completely off the document root allows me to demonstrate multiple YOURLS and multiple WP sites doing just that.

Finally, I would be the first to say this should be considered no more than beta software. I am more than capable of maintaining my production sites and "going it alone." Although it is working perfectly in my tests, I still need to work on the documentation and upgrade the XHTML to HTML5 (minor cleanup stuff). However, YOURLS MultiSite needs more and more varied testing.

I would like more people to test with me. For example, all plugins and API need testing. After the code proves itself you then may consider merging it into the YOURLS core. Do you have a suggestion how I might proceed with this? I am just learning about GitHub so forgive my ignorance. Would it be better to branch or fork this project? I do believe YOURLS MultiSite can be merged into the YOURLS Master once it has proven itself.

I will be looking for your advice on how to proceed,

Pop VeKind

PS: A big THANK YOU for such a wonderful program. It is very useful as is and also has great future potential.

@grzchr15

This comment has been minimized.

Show comment
Hide comment
@grzchr15

grzchr15 Oct 13, 2017

When do you plan to give us look into the code you changed?
You stopped your first try https://github.com/TuKod/Allow-YOURLS-with-CMS 5 years ago.
or where did you fork it? any chance to get read access to your repository?

grzchr15 commented Oct 13, 2017

When do you plan to give us look into the code you changed?
You stopped your first try https://github.com/TuKod/Allow-YOURLS-with-CMS 5 years ago.
or where did you fork it? any chance to get read access to your repository?

@PopVeKind

This comment has been minimized.

Show comment
Hide comment
@PopVeKind

PopVeKind Oct 30, 2017

Contributor

@grzchr15 - Sorry about the delay and the confusion, I will try to explain.

The project, including the MultiSite feature, we are referring to it as YOURLS-PV.
PV as in Pretty Valuable!

You can find all the information there is at yourls.y143.net Configuration examples are under construction, however, you will likely be interested in...
The YOURLS Code Adjustments Page.

You Asked, "When do you plan to give us look into the code you changed?"
I answered this in-depth at #1611
Short Answer, the YOURLS-PV site has it now!

You Said, "You stopped your first try ... 5 years ago."
Humm... I understand the confusion. The TuKod account belongs to the "TuKod Team". Tukod sounds like "To Code" and means "Support" in the locally used language (one of about 90 languages used here in the Philippines). The TuKod Team is a group of young people I teach and let use my computer and Internet connection. Most of them come from very poor families who earn and live on about US$1.30 a day! Per Family! None has any chance of attending college. However, one of them now has a job making websites, for about US$4 per 10 hour day. The others call him "Rich!"

The TuKod Team made "the first attempt." Likewise, I should not have borrowed their account to make my earlier YOURLS comments. TuKod is back, exclusively, for their use. PopVeKind is now my new retirement account. I'm sorry about the confusion.

You Asked,_ "any chance to get read access to your repository?"_
The top-right corner of yourls.y143.net has a link to the correct GitHub repository (PopVeKind/YOURLS), which is both open-source and can be accessed by the public.

CAUTION:
In order to keep YOURLS-PV as drop-in compatible with all installations of YOURLS, and as small as possible, we have not changed the included documentation. Nor did we change the .htaccess file that is automatically built. In order to use the NEW Features of YOURLS-PV, you must follow the configuration examples being posted on the website for both the config.php file and the .htaccess file..

Enjoy,

Pop VeKind

Contributor

PopVeKind commented Oct 30, 2017

@grzchr15 - Sorry about the delay and the confusion, I will try to explain.

The project, including the MultiSite feature, we are referring to it as YOURLS-PV.
PV as in Pretty Valuable!

You can find all the information there is at yourls.y143.net Configuration examples are under construction, however, you will likely be interested in...
The YOURLS Code Adjustments Page.

You Asked, "When do you plan to give us look into the code you changed?"
I answered this in-depth at #1611
Short Answer, the YOURLS-PV site has it now!

You Said, "You stopped your first try ... 5 years ago."
Humm... I understand the confusion. The TuKod account belongs to the "TuKod Team". Tukod sounds like "To Code" and means "Support" in the locally used language (one of about 90 languages used here in the Philippines). The TuKod Team is a group of young people I teach and let use my computer and Internet connection. Most of them come from very poor families who earn and live on about US$1.30 a day! Per Family! None has any chance of attending college. However, one of them now has a job making websites, for about US$4 per 10 hour day. The others call him "Rich!"

The TuKod Team made "the first attempt." Likewise, I should not have borrowed their account to make my earlier YOURLS comments. TuKod is back, exclusively, for their use. PopVeKind is now my new retirement account. I'm sorry about the confusion.

You Asked,_ "any chance to get read access to your repository?"_
The top-right corner of yourls.y143.net has a link to the correct GitHub repository (PopVeKind/YOURLS), which is both open-source and can be accessed by the public.

CAUTION:
In order to keep YOURLS-PV as drop-in compatible with all installations of YOURLS, and as small as possible, we have not changed the included documentation. Nor did we change the .htaccess file that is automatically built. In order to use the NEW Features of YOURLS-PV, you must follow the configuration examples being posted on the website for both the config.php file and the .htaccess file..

Enjoy,

Pop VeKind

@PopVeKind

This comment has been minimized.

Show comment
Hide comment
@PopVeKind

PopVeKind Nov 18, 2017

Contributor

Since the small YOURLS-PV Patch (formerly MultiSite) has matured and adjusted to the Config Class (Config.php). I decided to close this issue.

Future YOURLS-PV Patch development has moved to a new issue:
Testers Needed - YOURLS-PV Patch #2320

Contributor

PopVeKind commented Nov 18, 2017

Since the small YOURLS-PV Patch (formerly MultiSite) has matured and adjusted to the Config Class (Config.php). I decided to close this issue.

Future YOURLS-PV Patch development has moved to a new issue:
Testers Needed - YOURLS-PV Patch #2320

@TuKod TuKod closed this Nov 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment