Welcome Guest! To enable all features please Login or Register.
Options
View
Go to last post Go to first unread
Offline Ordinary Nimda  
#1 Posted : Thursday, May 12, 2016 2:37:41 PM(UTC)
Ordinary Nimda


Rank: YAF Lover

Reputation:

Joined: 2/8/2016(UTC)
Posts: 42
Slovenia
Location: LJ

Thanks: 13 times
Was thanked: 2 time(s) in 2 post(s)
I would like to change CSS file names (like adding incremental counters, or using a date modifier in the file names), which would force a new version to be downloaded to the client. DNN has this problem solved in an elegant way, but I did not find where YAF has these filenames specified. The following excerpt illustrates these files:

Code:

<!-- this is the bottom part of the HEAD element child nodes in a DNN page with the YAF module -->
<link href="/DesktopModules/YetAnotherForumDotNet/Content/forum.min.css" rel="stylesheet" type="text/css" />
<link href="/DesktopModules/YetAnotherForumDotNet/Themes/BlueGrey/theme.css" rel="stylesheet" type="text/css" />
<link href="/desktopmodules/yetanotherforumdotnet/content/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />

<style type="text/css">#simplemodal-overlay{background-color:#000;}</style>
<meta name="viewport" content="width=device-width,initial-scale=1" />

<script type="text/javascript" src="/DesktopModules/YetAnotherForumDotNet/Themes/BlueGrey/js/ColorGrey.js"></script>
<script type="text/javascript" src="/DesktopModules/YetAnotherForumDotNet/Scripts/jquery-ui-1.11.4.min.js"></script>


For example, I would like to change the name of "theme.css" to "theme.0001.css", and of course would increment the counter after more updates next week, etc.
Sponsor
Offline Ordinary Nimda  
#2 Posted : Sunday, May 15, 2016 5:52:18 AM(UTC)
Ordinary Nimda


Rank: YAF Lover

Reputation:

Joined: 2/8/2016(UTC)
Posts: 42
Slovenia
Location: LJ

Thanks: 13 times
Was thanked: 2 time(s) in 2 post(s)
I solved this problem:

  • Make a copy of a theme, and give it a name, and use that name for the folder. (e.g. BlueGrey_001)
  • Put this name in the header of the new XML file (e.g. BlueGrey_001, two occurrences in LINE 2).
  • Replace all original names in the YAF module yafdnn-res.zip.manifest file with the new name (e.g. BlueGrey_001 instead of BlueGrey)
  • Go to the ADMIN section of the forum web interface, and select the new skin, and SAVE it.
The resulting THEME.CSS in the forum module page output is now pointing to the proper directory. After doing another set of updates on a new copy of _001, just replace the _001 in the XML and the Manifest file with _002. Now, select the new skin in the ADMIN section of the web, then, delete the _001 folder and _001.XML file in the /themes/ folder, to clean up.

This overrides any caching mechanisms on the client side, and ensures the clients have an up-to-date YAF DNN Module CSS in their browsers.
Rss Feed  Atom Feed
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error