CSS - Another Web Company
ArcadeDownloadsNewslettersForum MenuNavigationWhat AWC OffersWiki ToolsLogin or Create Account

Log in

You must have cookies enabled to log in to Main Site - Local.

 

CSS

From Another Web Company

Viewed 482 times, With a total of 6 Posts
Have a suggestion, improvement, change or non-beta Forum Entension bug ? Please add them to the todo list

2.5.12 Update Release


Clicked A Few Times
Wiki Edit 0
Threads 3
Posts 14
How can I control CSS? Changing the CSS setting in admin panel seems to have no effect, it always includes the CSS in the served HTML page which is something I do not want. I want to have control of the CSS file & edit it manually as a whole. I already noticed the CSS does not come from Default.css, because making any changes to that file do not reflect in the forums.

Currently it looks like I have to wipe the current CSS stuff (whereever it actually is located at) and then either manually add a custom CSS file to the page header, or alternatively edit the common MediaWiki CSS files and add my forum styles there.

Also, the CSS editor in the admin panel is awfully cumbersome and limiting. If somebody knows CSS, he wants to edit the whole file at once. The current separation doesn't work.
Edited On 11:44:45 AM - Wednesday 08th, September 2010 by Merri

Forum Vet
Wiki Edit 2995
Threads 153
Posts 1524
-
CSS_editing_(Forum_AdminCP)
If you have already done this and the css is still being injected into the html, its a write permissions issue on the extensions/awc/forums/skins/css/ dir.

Just so you know, if you start to edit that ##.css file by hand, there is no phaser writin in the code to save that info back to the database. If you do edit it by hand and then somewhere along the lines someone else decides to go into the AdminCP and make a change and then save that change, all of your hand writen file edits will be lost. Im sure you get the point, just wanted to state that in public in case someone else reads this thread.

How the css works:
All info is stored in the 'awc_f_theme_css' table.
Forum checks if there is a .css file, if so - it uses that file, if not it will pull the info from the db and inject it into the html source.

Dont have time to get into the reasons, why.

Will keep in mind to make the AdminCP css section alittle more open and not broken up into so many small sections.


Merri, you have to keep in mind - this is a small forum extension; not IPB, VBF, SMF, PHPforum or any of the others which have been around for a while.

_
~ What was once an opinion, became a fact, to be later proven wrong ~
  • Forum Ver. 2.5.12 has been released (05/05/2011), Download here.


Clicked A Few Times
Wiki Edit 0
Threads 3
Posts 14
I dropped everything in wiki_awc_f_theme_css and simply inserted this instead:

INSERT INTO `wiki_awc_f_theme_css` (`css_id`, `css_thm_id`, `css_thmn_id`, `css_section`, `css_ver`, `css_att`, `css_code`, `css_custom`, `css_forumver`, `css_date`) VALUES
(1, 1, 1, 'import', NULL, '@import url(/w/extensions/awc/forums/default.css); html', '', 0, NULL, '2010-12-19 08:00:00');


Now it loads the CSS file instead & I don't need to touch the CSS features of the admin panel.


I guess one of the reasons to bring this up is that the current CSS implementation is too heavy and complex. All that needs to be done is to define the CSS file to be used, or maybe give a simple textarea to modify the file. CSS should never be in the database. For one reason, the database I use is in heavy use, which means access times to the database are slower than accessing the file system. This little change made the forum access times slightly faster already, because: 1) only one item in databse 2) the CSS file can be cached by browser
Edited On 3:05:05 PM - Wednesday 08th, September 2010 by Merri

Forum Vet
Wiki Edit 2995
Threads 153
Posts 1524
Like said before, maybe this extension is not best for your needs.

Clicked A Few Times
Wiki Edit 0
Threads 3
Posts 14
This is probably a bit too lengthy post, more than it needs to be, but I'm too lazy to oversimplify it... but anyway, "best" is a very relative subject. Lets say I'd go ahead and use some non-MediaWiki extension for a forum.

The first issue would be with user integration. Open source forums often have integrations that are not supported and often depend on activity of one or two persons. Versions also tend to be very old if integration can be found. Pay forums may give the support, but are still likely to have issues on major MediaWiki upgrades (more than an extension would). Integrations may also be limited and have issues on some special cases – such as some characters on usernames, depending on whether users are registered via forum or via wiki.

The second issue is content integration. AWCF makes it very easy to have one place where actual content resides and then duplicate that information. Better yet, it is possible to use the same syntax for message & article writing all over the site: this has the advantage of making wiki activity much more likely as people learn the syntax in the forum little by little. Linking to wiki articles is a great plus. Getting this kind of support of MediaWiki features to other forum software is hard, if not impossible.

Finally it comes down to experiences. Within the past two-three years I let others get their will through and installed more software instead of trying do deal via custom code route. Earlier I had just a wiki + forum + some custom code, later a lot of different software to deal with. I could get it running somewhat smoothly, until one by one got hit by "end of support" for integration components as the months passed by. This spring I had only one integration still working properly and that for the least important component on the site. If I wanted to fix it I'd have to spend tons of time first to learn how each software worked, how the integration worked and only then I could've found why it wouldn't work anymore. And this with zero support.

So now things are heading to MediaWiki-only + extensions. While extensions may break over the time, they're still more likely to work than any integration components. It is also possible to get support from others thanks to the broad MediaWiki community. Even if you ended AWCF development or I'd got a need for features you couldn't provide I can always go for the fork route (or try extending without code modifications). Dealing with a MediaWiki extension designed for MediaWiki is certainly easier to manage than a fully separate forum software not designed for MediaWiki with an integration that depends on both MediaWiki & forum software not changing anything that would break it.

Summa summarum... despite AWCF having a lot of weak points (one man development & support, small bugs here and there, features that haven't been done as "professionally" as in bigger forum software) the pros win over the cons. Even if I sometimes give feedback that may be harsh or that may sound too much like I'd be asking something to be different, I'm only doing it in hopes getting a better software. This far I haven't found any issue that I couldn't live & deal with. Of course I'd like to have some things different but that would be true with other forum software as well.

AWCF is currently the best solution I know of.

Forum Vet
Wiki Edit 2995
Threads 153
Posts 1524
Quote:Merri Sep 8th 2:54 pm
I dropped everything in wiki_awc_f_theme_css and simply inserted this instead:

INSERT INTO `wiki_awc_f_theme_css` (`css_id`, `css_thm_id`, `css_thmn_id`, `css_section`, `css_ver`, `css_att`, `css_code`, `css_custom`, `css_forumver`, `css_date`) VALUES
(1, 1, 1, 'import', NULL, '@import url(/w/extensions/awc/forums/default.css); html', '', 0, NULL, '2010-12-19 08:00:00');


Now it loads the CSS file instead & I don't need to touch the CSS features of the admin panel.


yea, but in-order to display the css, you are still making a sql query to read from a file (true, only one record but an un-needed one).
If you save the css like said in the link above, it will not make any sql quires for the css, it will just load the css file which has been saved to disc.
There are reasons why the css is initially in the dbase. I understand what you are saying about the editing aspect, there should be an option which gives more freedom when editing and i will keep that in mind.
If you havnt already, you can look at the html source here, thats how its loaded (from a file, no SQL):
<link rel="stylesheet" type="text/css" href="/extensions/awc/forums/skins/css/id2.css"/>


As for your other post; i do not need any justification on how you think your opinion effects me, why you make the decisions you make or more so - that you think your opinion is the reason why i said this forum may not be for you.

_

Forum Vet
Wiki Edit 2995
Threads 153
Posts 1524
Hey Merri...
If you do stay with this forum, would the following work for you as a temporary "fix" ?
I do not have the time to fine tune anything, but can have the following working for the next minor release (with a few more small changes).

You would have to use the current system, save the css file to disc (only one time) - (like talked about above) and ive added a second editing option which will bring people to the screen shot below (which will give access to the full css in one editing box).

After editing is submitted, im gonna add a "config check" and if the Admin has it set to "save to disc" and it will automaticly save the edits to the dbase (as a backup & version control (only on attributes that have been edited will be saved)) and also write the file to disc so when rendered it will link off a file and not be embedded in the page.

I do like this idea of editing chunks (or the whole) css, but do not have the time to make it nice and pretty, so it will be a little crude for a few release, but will be working non-the-less.

Forum css edit all atts.png



A quick break down one how its working to this point.
AdminCP:
  • pulls each css record and display them in the 'textarea' (image above)
  • on submit, textarea is split into an array based on } to get each attribute
  • the current css records loop over that array and do a second split based on { to get the attributes "title" (sorry i forget the correct name right now) and code separate.
  • trim() the results and do a check on matching attributes "title" and then do a check to see if the current code is the same as the submitted code, if different then the update is made, old version is logged with version number.
  • write to file once complete (still need to write that check)

It is alittle over head, but being its an admin option and its not going to be used day-to-day, let along hour to hour like posting threads or replies, i personally done see it being that big of a deal right now.

I can not ever see this forum deserting the dbase as a second storage and version control for css or skins, but will try to display and make the editing of it the easiest and most flexible for everyone's taste and abilities.


If this is something which will fill your needs for now, i can get it all working in the next day and send you a download link for version 2.5.12. Its late for me, and im tired, but i do have an idea which might let us use your current (edited css file) and get that data back into the dbase so we have a starting point.

If you let me know, ill see what i can do, im sure between the two of use we can work something out.

_


Forum >> AWC`s MediaWiki Extension`s >> AWC's MediaWiki Forum Extension



Who's here now Members 0 Guests 0 Bots/Crawler 0


AWC's: 2.6.0 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC