Change settings for file extensions in Expression Web 3 - expression-web

I want to change how certain file extensions are treated within Microsoft Expression Web 3. For example, *.inc should be treated like PHP includes, so they get PHP color coding and code hints.
Is this possible and how can I achieve this?

Looks like there's a pretty good rundown on how to do this at:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=69
I'm not on my Windows machine right now, but I'm guessing if you configure the extension "inc" to open with "Expression Web (Open as HTML)", that should do the trick.

Related

TYPO3 CMS 9.5.5 most simple extension

I have to create a simple TYPO3 extension for version 9.5.5.
i installed TYPO3 CMS 9.5.5 from https://bitnami.com/stack/typo3
in docu for latest (9-dev)
https://docs.typo3.org/typo3cms/CoreApiReference/ExtensionArchitecture/FilesAndLocations/Index.html
they say "usually located in typo3conf/ext for local extensions, or typo3/sysext for system extensions."
i dont have a "typo3conf/ext", no "typo3conf" and "typo3/ext" . and yes there is a "typo3/sysext".
I have not found a guide online that takes this fact into account.
Then i read "... there is a tool which makes it easier to start. It is called Extension builder" ( https://docs.typo3.org/typo3cms/CoreApiReference/ExtensionArchitecture/CreateNewExtension/Index.html )
Ttherefore I have installed this "Extension Builder"
via Zip from https://extensions.typo3.org/extension/extension_builder/
Download ZIP file
Log into your TYPO3 backend
Go to Extension Manager module
Press the upload button on the top bar
Select the ZIP file and upload it.
and with me it looks very different as in the documentation:
then i read "Docs » Creating a first extension » Create Folder Structure And Configuration Files" (https://docs.typo3.org/typo3cms/ExtbaseFluidBook/4-FirstExtension/2-create-folder-structure-and-configuration-files.html)
There they talk about "unique identifier of our extension". whats this?
"as store_inventory". whats this?
anyway.
and "These are in the folder typo3conf/ext/"
but this folder does not exist in my installation.
I then looked into an installation of another computer days later and there was this folder also not.
anyway.
i created then "typo3conf/ext/store_inventory" (as described there).
then I wondered about the following formulation:
"The name of this folder must be written like the extension key"
So this folder probably had to be different named?
then i found this folder structure at the same page:
https://docs.typo3.org/typo3cms/ExtbaseFluidBook/_images/figure-4-1.png
and I wondered a lot about the amount of folders and files.
I just wanted to make a simple extension that just lists files.
I thought that's a few lines of source code.
is not that any easier?
I do not need all these things like eg. ext_icon.gif. i hope i do not need to create all that files and folder manually.
Here are some answers:
The extension key is the name of your folder inside of "typo3conf/ext". I recommend not using an underscore because it might be confusing for you later on as a beginner with TYPO3. Choose a simple and short name. To make sure the name is not available already, please check "extensions.typo3.org" to see if the key (extension name) is already taken. If you want to be 100% sure, you have to register an account there and register the extension key officially. This is all free of course.
The file ext_icon.gif is indeed not necessary, but looks nice when your extension is shown in the list of extensions in the Extension Manager of TYPO3.
You say you want to "list files". I guess you are talking about static files like images etc. that you have in your fileadmin folder already?
So in this case you need a minimum folder structure like this:
store_inventory
Classes
Controller
StoreController.php (Contains PHP function "filesList")
Configuration
TypoScript
Resources
Private
Templates
Files.html (Contains HTML/Fluid-Code for Frontend)
ext_emconf.php (Contains necessary information about your Ext.)
ext_localconf.php (Contains registration of Frontend-Plugin/Controller)
A more detailed answer requires more information about your extension's exact requirements. Here are some more links that I think you might need for this project:
ext_emconf.php
https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ExtensionArchitecture/DeclarationFile/Index.html#
ext_localconf.php
https://docs.typo3.org/m/typo3/book-extbasefluid/master/en-us/4-FirstExtension/7-configuring-the-plugin.html
Controllers and Actions:
https://docs.typo3.org/m/typo3/book-extbasefluid/master/en-us/7-Controllers/1-Creating-Controllers-and-Actions.html
Your Controller needs to have a function called for instance "fileAction" and the template file for this "Action" must be named "File.html" in order to work. If you name the action "fileListAction", your template file must be named "FileList.html" and so on...
There are some other small things to think about, but I don't know enough about your exact requirements. If you have any trouble, don't hesitate to ask more questions!
I know, TYPO3 can be frustrating. I do it for decades already ;)
Good luck

index of source file [apache]

Currently I have a website setup with apache on ubuntu.
I'd like to customize the "Index of" file (the one that comes up when there is no index.html/php/etc as defined under DirectoryIndex) to remove the line of text that says "Apache/x.x.x (Ubuntu) Server at domain Port #".
I'm not sure where this file is located (in order to locate it and edit it). Additionally, I'd like to know how to have Apache point towards a different file (e.g. comment out the indexof.file and have it point towards a customized indexof2.file).
Image of the "Index of" file that I'm talking about:
Summary of my questions:
1) Where is the "Index of" file located
2) How can I direct Apache to use a different "Index of" file (when there are no index.html/php/etc in that directory).
The automatic index Apache generates is handled by this module (available by default): https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html
The customisation options would be way to long to explain here but they definitely exist, and are detailed in the link above.
More specifically, you want to have a look at the styling options from this chapter: https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html#indexoptions
You can also find "premade" option packages like this one: http://adamwhitcroft.com/apaxy/
It's probably worth looking at this to understand how it works and get a good example of what's possible.
In this specific example, there's a lot of IndexOptions involved, as you can see in https://github.com/AdamWhitcroft/apaxy/blob/master/apaxy/htaccess.txt
Definitely not something easy to implement as this not just a file to edit, like you would edit a template, but there's room for customisation.
Thanks to Capsule's response, I was able to research in a more meaningful manner and I stumbled upon a nice guide. For anybody who may visit this stackoverflow question of mine in future and is looking for a guide on editting the "Index of" directory page, the guide may help you too: https://perishablepress.com/better-default-directory-views-with-htaccess/

How to know the url from a pdf component? (Tridion2009)

We have some pdf as a multimedia components. And I would like to know the url before I publish the page where we are using the pdf. The component is already published.
I was trying to guess looking another examples: domain/en/multimedia/Name_pdf.pdf
But didn't work...
¿Someone knows the rule?
Thank you,
A lot depends on how you are handling the multimedia component within your templates, whether you are creating variants (probably not for PDF files) and, to a certain extent, what kind of delivery environment you are using and how it is configured.
If you are trying to output a link to your published binary from a template, you should probably use the out-of-the-box functionality by outputting syntax like
text
from your templates and then using the other default TBBs to publish the component and resolve the link for you.
However, in a default, standard 2009 environment, with normal publishing, you should find that your file is simply published to the file system at
<Publication Images Path>\<Binary Filename>
With the link resolving to
http://<Your server>/<Publication Images URL>/<Binary Filename>
Note:
In earlier versions of Tridion the binary filename was manipulated to include the TCM Id for uniqueness, but by 2009 this was no longer the case

Localization of a DotNetNuke website

I am working on a website in dnn. I want to change the language of website or particular page. So I download the language package for spanish(es-es),chinese(zh-cn) and install them from host. Next when I changed the language of browser then the website language didn't change. Working on dnn 5.0.
Please let me know how I can use language packages in dnn website.
For initial translations and maintenance of DotNetNuke translations, I recommend the use of OmegaT. It handles resx files directly. And content (such as HTML or Blogs) can be downloaded, translated and then uploaded thanks to the APIs of DNN (drop me a note if you need the scripts).
OmegaT stores the translations in it's memory (a TMX file, which is actually some kind of XML). It also uses Google Translate and similars, and has a fast user interface which increases translation speed a lot when compared against continously waiting for DotNetNuke to handle your updated resources.
More info on OmegaT. An example of a translated site and modules: site translated from Dutch into English
You should probably ask this in the DotNetNuke forums: http://www.dotnetnuke.com/tabid/795/default.aspx.
There's one dedicated forum for questions about language packs and localization. You will probably find your answer there: http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/77/scope/threads/Default.aspx
The language packs don't always have translations for everything on the site, especially content that you added yourself. You'll need to do two things to get them working properly:
Go to Admin > Languages, and enable the languages you want to use.
Open the Language Editor and start translating. Under each resource name, you will see an edit text box for the localized value, and a read-only text box for the default value. In most cases, you'll need to translate verbatim what you see under "default value".
We had to write our own menu provider to get the menu to do this - instead of going for the resource files we went for a database solution - other reasons applied to this as well - we also built an interface for doing this - as for things like the text/html module there are some third party builds that allow you to nationalize content. Apollo comes to mind Apollo Software they have some multilanguage modules
The language packs will typically only localize text used by the core such as "Login" and "Settings". It is designed so that you can have a site in a language other than English, not so you can have multiple languages on one site. You can easily have multiple portals, each with a different language.
In order to have multiple locales on one portal you will need to use a third party module or develop your own.

Automate adding entries to a wiki

Once I have my renamed files I need to add them to my project's wiki page. This is a fairly repetitive manual task, so I guess I could script it but I don't know where to start.
The process is:
Got to appropriate page on the wiki
for each team member (DeveloperA, DeveloperB, DeveloperC)
{
for each of two files ('*_current.jpg', '*_lastweek.jpg')
{
Select 'Attach' link on page
Select the 'manage' link next to the file to be updated
Click 'Browse' button
Browse to the relevant file (which has the same name as the previous version)
Click 'Upload file' button
}
}
Not necessarily looking for the full solution as I'd like to give it a go myself.
Where to begin? What language could I use to do this and how difficult would it be?
Check if the wiki you mean to talk to supports XMLRPC, because if it does it should be a snap. I wrote a tool called WikiUp to solve a similar problem (updating a delineated section on a wiki page).
If you're writing in C#, the WebClient classes might be a good place to start. I bet people could give more specific advice if you mentioned which wiki platform you are using, and whether it requires authentication, though.
I'd probably start by downloading fiddler and watching the http requests from doing it manually. Then you could use some simple scripts and regexes to build your http requests for automating the process.
Of course, if your wildly lucky, your wiki would have a backend simple enough that you could just plug them into its db directly. :)
You might find CoScripter useful -- it's a Firefox extension that allows you to automate tasks you perform on websites. I'm not certain how you'd integrate this with the list of files you're changing on your local system, but it can certainly handle the file uploading through a web form.
Better bet is probably using cURL or a similar HTTP library with your programming language of choice. If you're on *nix, you can use the cURL commandline program inside your shell script to get this done fairly easily. (Like #jsight said you will need to analyze the actual forms you're using on the webpage, using Fiddler or just looking at the form elements and re-creating the POST through cURL.)