FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » virtual hosts support
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Re: virtual hosts support [message #28169 is a reply to message #28168] Wed, 12 October 2005 21:08 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Yes, they are equal.

FUDforum Core Developer
Re: virtual hosts support [message #28184 is a reply to message #28169] Thu, 13 October 2005 06:13 Go to previous messageGo to next message
ruzam is currently offline  ruzam   Canada
Messages: 44
Registered: July 2005
Karma: 0
Member
Then my original comment:

compiler.inc there are a couple of instances of:

$GLOBALS['DATA_DIR'] . 'include/theme

These should be:

$GLOBALS['INCLUDE'] . 'theme

Still stands? Nothing spoils a day faster than a program that thinks data exists in two places at the same time!
Re: virtual hosts support [message #28194 is a reply to message #28184] Thu, 13 October 2005 15:47 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Fixed in CVS.
http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=7378


FUDforum Core Developer
Re: virtual hosts support [message #28226 is a reply to message #5238] Fri, 14 October 2005 07:15 Go to previous messageGo to next message
Anonymous   Canada
Ok, well, I'm making darn good progress on virtual sites. Cleaned up a fair bit of the icon admin code to make it more conistent between all the different admin options (OK, so I've only looked at mime types and forum icons to start). I have a workable plan in place that allows me to upload icons to the virtual site images directories, yet still be able to select (but not change) the standard system images. Involves a we bit of trickery calling a new script called 'image.php' to display the custom images. Things are looking good.

Now for the bad. What is up with the different image storage formats?? Smiley icons have an 'icon_' prefix, Message icons have none. Mime icons store just the file base name in the table, requiring templates to fill in the image path where as, forum icons store the whole (relative) image path in the table. Forum icons work great with my scheme. Just substitute the new path for the custom images and things are flying. Mime icons on the other hand are a horrible mess. I'm going to have to modify themes and templates and who knows what to dynamically subsitute either the straight standard path or the funky custom path. Is there a logical reason for this? Is there a big picture plan to converge the icon image handling into a single unified format?

Please tell me Mime icons are the exception to the rule and the other Icons work like Forum icons (full relative paths)
Re: virtual hosts support [message #28241 is a reply to message #28226] Fri, 14 October 2005 13:57 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The icon prefix is just a chance occurance, icons do not need to have this prefix, if you upload your own they'll have the original name.
There are no plans to change the image handling process at this time.


FUDforum Core Developer
Re: virtual hosts support [message #28251 is a reply to message #28241] Fri, 14 October 2005 16:10 Go to previous messageGo to next message
ruzam is currently offline  ruzam   Canada
Messages: 44
Registered: July 2005
Karma: 0
Member
Hmmm... You have a knack for repeating code Wink

Ok, now I know you have an aversion virtual hosts support, but bare with me:

Take a close look at icons_adm.inc (skip over the virtual hosting specific bits) and admiconsel.php. These two (one new, one re-write) make for a single unified source of code to handle icons. Greatly simplifies the icon admin mamagement, and totally eliminates admavatarsel.php, admmimesel.php and admsmileyssel.php (or at least it could). I've patched admforum.php and admmime.php to use it so far. The mime patch looks pretty much exactly the same as it did before. The forum patch adds an icon upload section (as it shoud) to the forum editor. As it is in your existing code, you're doing the same thing over and over again. Sometimes the page says it will accept (.gif, *.jpg, *.jpeg, *.png), sometimes the page says it will accept (.gif, *.jpg, *.png), even though it does accept *.jpeg. That's what happens when you duplicate code Crying or Very Sad

I've eliminated the duplication. All Icons are treated equal, the interface is consitent to the user, the code is simplified. If a future icon type pops into existence, adding it to FUD will be a breaze. In fact, now the code can be tweaked to allow an external URL anywhere an icon can be displayed. That's some awesome flexibility.

BUT, forum icons work out of the box this way. MIME icons do not (and I suspect I'm going to find the same problem with smileys). I can probably fudge a whole bunch of code to maintain compatibility with existing FUD data, but that's going to create a future upgrade mess, or I could break with existing icon storage method, and start clean with a simple common image storage. I'm going to have to tweak the templates for MIME icons either way.

If you don't feel a unified icon management/presentation is a good thing, then I guess my only option is to branch and forget the backward compatibility. If you think common icon code is a good thing, then I'll keep hacking along with compatiblility in mind.
Re: virtual hosts support [message #28256 is a reply to message #28251] Sat, 15 October 2005 04:06 Go to previous messageGo to next message
ruzam is currently offline  ruzam   Canada
Messages: 44
Registered: July 2005
Karma: 0
Member
Without this patch, the cancel buttons on the admin page are totally messed up.
Re: virtual hosts support [message #28278 is a reply to message #28256] Sat, 15 October 2005 17:34 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I don't exactly see the problem with mime images, like all fud images it uses relative paths images/[dir]/image_file. Mime images are stored in a database for a reason, that being is that they are associated with mime types that need to be referenced somehow. Same is true for smileys/emoticons that need to be referenced to one or more codes.
As far as icons for forums and message those do not need any references and therefor are simply kept as files inside a directory.

As far as unifying code, that is indeed a good idea, although your approach is far more complex then it needs to be. I'll try to come up with my own patch in the next day or two.


FUDforum Core Developer
Re: virtual hosts support [message #28284 is a reply to message #28278] Sat, 15 October 2005 18:39 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Here is the patch:
http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=7386


FUDforum Core Developer
Re: virtual hosts support [message #28296 is a reply to message #28284] Sun, 16 October 2005 15:56 Go to previous messageGo to next message
ruzam is currently offline  ruzam   Canada
Messages: 44
Registered: July 2005
Karma: 0
Member
Nope. All you've done is consistently hard coded image paths. That's exactly what I was trying to get away from Sad

I don't feel image paths should be part of the templates at all. A virtual site images will never exist in th www_root image directory. If there's no way of specifying an alternate image path, then you've completely banned any possible virtual site use. Or any alternate image path (like an external URL for example).

What I would like to see is all template images of the form of src="{var}" not src="images/mime/{var}". For starters, this would allow the FUD code to decide how image paths are formed without having to mess with templates and rebuild themes.

I'd also like to see the full image URL stored in what ever table or cache the image is going to be stored in. Not just the image basename.

Hard coding image paths as you've done in this patch is not compatible with virtual hosting of any kind.
Re: virtual hosts support [message #28298 is a reply to message #28296] Sun, 16 October 2005 16:23 Go to previous messageGo to next message
ruzam is currently offline  ruzam   Canada
Messages: 44
Registered: July 2005
Karma: 0
Member
Avatars:

Why to you keep a copy of the avatar location source in the users table? You've already got a reference to the avatar by it's id. Storing copies of the location as well is waste of space and maintenance headache.
Re: virtual hosts support [message #28299 is a reply to message #28298] Sun, 16 October 2005 16:29 Go to previous messageGo to next message
ruzam is currently offline  ruzam   Canada
Messages: 44
Registered: July 2005
Karma: 0
Member
For that matter, why do you bother to save the avatar image size? You don't use the size of any other image or icon, and you're not re-adjusting the size of the avatar from what it's stored as.
Re: virtual hosts support [message #28308 is a reply to message #28299] Mon, 17 October 2005 14:39 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Let me explain the logic with avatars.

As you know in FUDforum there are 2 type of avatars, built-in and user-uploaded, consequently there are 2 avatar storage directories. Rather then waste cpu time during page rendering to determine where the avatar is actually found the entire <img src=""> tag is stored in the user's record so it can be displayed to screen without any further processing. Since we already strore the image tag, we also speed up avatar rendering speed by storing the avatars dimensions.


FUDforum Core Developer
Re: virtual hosts support [message #28309 is a reply to message #28296] Mon, 17 October 2005 14:43 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The image paths uses are relative, not full paths so for each (sub)domain they would point at different location. Bottom line is that each site should have its own WWW_ROOT dir in a vhost config. You can cheat and use hardlinks to share some data, but you cannot escape this need.

Why not?

Well, you need different theme dir, so each site can customize the look and feel. You need a different built-in/user supplied avatar dir so each forum can have it's own set of built-in avatars and avoid conflicts with user supplied ones. Same would be true for forum icons, mime icons and message icons.

Aside from that not much is left in WWW_ROOT, so it should not be shared.


FUDforum Core Developer
Re: virtual hosts support [message #28317 is a reply to message #5238] Mon, 17 October 2005 17:02 Go to previous messageGo to next message
ruzam is currently offline  ruzam   Canada
Messages: 44
Registered: July 2005
Karma: 0
Member
By that logic you might as well just install a new version of FUD in each and every virtual site. You're totally missing the point.

You've already got system avatars and user supplied avatars. This is no different than system supplied forum icons and virtual site supplied forum icons. Except that you've completely hard coded all the image references (relative or not) to make this impossible. Heck, a guy can't even setup an Apache mod_rewrite rule to intercept custom images, becuase they're all hard coded to the same images/* location.

Virtual site support means a single administrator can manage a single source of the FUD code so updates and bug fixes can become instantly available for all virtual sites. There's no way an admin can go through each and every virtual site to tweak it every time there's a change.

Virtual site support means the FUD code source and standard images can be locked down read only so virtual sites can't mess things up for others.

Virtual site support means that a virtual site user can be up and running with a default FUD setup without requiring any knowlege of PHP, MYSQL or web servers what so ever.

Just how many FUD users do you think customize their themes anyway? Beyond just getting the thing installed and working I'm betting most are just happy to have a forum and really don't have the knowlege and/or time to go mucking with the various templates. I mean look at your own forum. You've got exactly one blurb of customized html at the top and that's all that 99% of FUD installers need. Any theme can be simply customized through a personalized CSS style sheet and a few strategic include files (header, footer). There's no reason for virtual sites to have to compile themes. For that matter, I don't agree there needs to be a reason to compile FUD themes in the first place.
Re: virtual hosts support [message #28318 is a reply to message #28317] Mon, 17 October 2005 20:03 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Actually you can write a mod_rewrite rule based on the hostname, hack you can do it with a faster mod_alias even. If you don't believe that is the case I suggest you read the documentation for those 2 Apache extensions.

FUDforum is designed for flexibility in mind, if you want to customize just the headers that fine, if you want to change the completely look as suprisingly enough people have done it can do that too.

Your idea of one install shared by many as far as you've described is not practical, since it goes contrary to flexebility principles offered by the software.

As far as maintaining many forums, upgrading is as trivial as making a cronjob run the upgrade script on as many forums as you like...


FUDforum Core Developer
Re: virtual hosts support [message #28321 is a reply to message #28318] Mon, 17 October 2005 23:18 Go to previous message
ruzam is currently offline  ruzam   Canada
Messages: 44
Registered: July 2005
Karma: 0
Member
Never mind... I can see you've got a mindset that really isn't into virtual site support.

Thanks for your time Smile
Pages (2): [ «    1  2]  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: dont show catagories if they are invisible
Next Topic: default forum
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu May 02 08:21:16 GMT 2024

Total time taken to generate the page: 0.03063 seconds