I am trying to modify the web interface of bootstrap theme in OpenWrt's luci web interface and i managed to change colors and some simple things but i cannot find how to change the names of the tabs (for example instead of "status" to write "status11111"). Also i wanted to add a logo picture on the top of the page and i managed to add it for the login page and also it appears on the default main page after the login but then if I swap to any tab the picture appears like crashed or missing (see the image bellow) and the link becomes like this "/cgi-bin/luci/;stok=96c966ea63a7913b6c02fc09c7862d77/admin/status/overview".
My 2 questions are: how can I change the names of the tabs and how can I add a logo picture on the top of the page so it can appear to every tab? What files do I have to modify?
For question #1 "how to change the names of the tabs", you want to look in /usr/lib/lua/luci/controllers/admin
There will be a number of files including "index.lua", "status.lua", "network.lua", etc. If, for example, you wanted to change the name of the status tab from "Status" to "New Status Tab Name", you would go into status.lua and find the line:
entry({"admin", "status"}, alias("admin", "status", "overview"), _("Status"), 20).index = true
and replace it with:
entry({"admin", "status"}, alias("admin", "status", "overview"), _("New Status Tab Name"), 20).index = true
For question #2, what exactly did you edit when you added the image?
Related
I need to create a footer in a Liferay-project, that can be modified from the instance. I've been trying various things in my footer-code and instance, but haven't figured out how to do it.
Any content inside the footer can't be touched and in page edit mode, Liferay says "This area is defined by the theme. You can change the theme settings by clicking more in the Page Design Options panel on the sidebar". I didn't get any help from Page Design Options either. Is there a way to do this?
I found the answer after hours of work and searching and want to share it with everyone here. The working solution was found here, in one of the comments.
You need to write some code (I use Freemarker/ftl) and then configure the site pages a bit, but here's how it works:
Put a new setting inside liferay-look-and-feel.xml:
<settings>
<setting key="footer-article-id" value="" configurable="true" type="text"/>
</settings>
This will create a new configurable option in page options, allowing you to input the ID of the web content.
NOTE: <theme> might get underlined red "The content of element type "theme" must match". This still prints everything correctly, but the tags are given in a wrong order. Inside my <theme>, I have <template-extension>, <settings> and <portlet-decorator> in that order, which removes the error.
Assign a variable in init_custom.ftl (cleans up the footer-code):
<#assign footer_article_id = getterUtil.getString(themeDisplay.getThemeSetting("footer-article-id"))/>
And then add this to the footer-code, to create the spot, where the content is visible:
<#liferay_journal["journal-article"]
articleId=footer_article_id
groupId=page_group.groupId
/>
After this, everything should be ready code-wise.
Create a Web Content for your footer. In the creation screen, there's an ID on the panel on the right. Publish your content and grab the ID.
Finally, go to Site Builder --> Pages and click on configuration from the top bar (behind three dots). You should see the input field like in the first picture: That's where you add the ID.
Save the settings and your web content should now be in the footer.
Hope this helps!
I'm trying to create a Custom Part that just drops text into the page. I've created a part using the GUI that I called "Side Feature" and I added a text field called "Featured". I am trying put it on the side bar which I created on my layout, but I don't know how to move it to the sidebar. It shows up on my main content.
How do I move it to the sidebar? I tried using "#Display(Model.Featured)", but that doesn't seem to work. I also read about the placement.info file, but I'm not too sure how that would work in this sense.
I couldn't find a tutorial/blog post online similar to this. Most of them were too advanced. I am very new to Orchard.
You can't without code or additional module: sidebar is a zone for widgets, not for content parts. Placement info only works for local zones within the global Content zone.
If you want to do it through code, follow this: http://weblogs.asp.net/bleroy/archive/2011/03/26/dispatching-orchard-shapes-to-arbitrary-zones.aspx
If you want to use a module, look for Origami on the gallery.
I disabled the advanced & target tabs from the link dialog, and only left the URL input box.
Actually what I did is exactly explained here: http://peterpetrik.com/blog/remove-tabs-and-elements-from-ckeditor-dialog-window
My question is, is it possible to add a text string to the dialog (as my supplement hints for users.) ?
Yes, you can use " add(elementDefinition, nextSiblingId) ", to add elements to the dialog.
From the code on the page in your link, I added "infoTab.add" before the "infoTab.remove" entries:
infoTab.add(
{
type : 'html',
html : '<div id="myDiv">Supplemental <b>hint</b>.</div><br />'
},
'linkType'
);
// Remove unnecessary widgets from the 'Link Info' tab.
infoTab.remove( 'linkType');
infoTab.remove( 'protocol');
The nextSiblingId is used to place the new element above an existing element.
I assigned "linkType" as nextSiblingId to place the new element above the url input box.
To place the new element between the url input box and the browse button, replace 'linkType' with 'browse' ( 'browse' is the id assigned to the browse button in the definition for the link dialog ).
To place the new element below the button, just remove ( , 'linkType' ).
Between this information and that found on the page you linked to, you should be able to accomplish your goal.
If you want to get a better understanding of your options, you can look at the following files:
The source files for the link dialog:
http://docs.cksource.com/ckeditor_api/symbols/src/plugins_link_plugin.js.html
http://docs.cksource.com/ckeditor_api/symbols/src/plugins_link_dialogs_link.js.html
http://docs.cksource.com/ckeditor_api/symbols/src/plugins_link_dialogs_anchor.js.html
The source files are also in your CKEditor directory:
ckecitor/_source/plugins/link/
The CKEditor documentation is located here:
http://docs.cksource.com/
Some relevant info from the CKEditor API:
CKEDITOR.dialog
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.html
CKEDITOR.dialog.definition.html
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.html.html
CKEDITOR.dialog.definitionObject
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definitionObject.html
CKEDITOR.dialog.definition.contentObject
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.contentObject.html
Be Well,
Joe
How to include custom javascript file to amazon webstore?
To include a custom js file in Amazon Webstore you:
1.From the homescreen click the customize url button
2.Select "use your own domain name" * Even if you dont plan to use your own you still must choose this.
3.In the custom url field it should say either example.webstorepowered.com or example.hostedbyamazon.com, change your domain name to example.hostedbywebstore.com
Where example is whatever your store would be named
4. check the confirm button and submit.
5. Go to "store design" "file library" from the dropdown and upload your js file to the appropriate folder.
Noe this file will appear with a red "x" over the top of it - this simply means you cannot use this file on any checkout or processing pages so amazon can ensure the integrity and security of the sales.
6.Next you will want to go to "store design" "merchandizing and layout"
7.click "properties" in the upper left corner
8.Choose "css and js" and select and the file so you custom js is loaded with all the other amazon required files.
That should be all you need. I just recently figured this out so post if you have any more questions.
Go to one of the main template pages under "Merchandising & Layout" click Properties on the top right and upload a js file to be included.
You can also place inline script tags within the widgets.
You can insert a script in the page with greasemonkey script, or userscript in the userscript folder in Chrome/Opera.
I am using Sharepoint service to create a webpage. I have an image - the logo on the top-right of the homepage - and am wanting to put a hyperlink so when it is pressed it takes you to another site. How would I do that please?
UPDATE
Next time I'll read the question more carefully. I mixed up right with left and thought he want to change the logo in the top left next to the site's title.
The question is, should the link point always to the same target and should the logo be always the same one or will the link target and logo differ from site to site?
If it should be always the same logo then editing the master page would be the easiest solution.
For different link targets and logos you have to plan a little bit more. First you'll need a place where you could store the link target. I think the SPWeb's PropertyBag would be a good place therefore. Furthermore you need a place to store the you logo. In this case a library on the new site will do the job.
Finally I would implement a control that creates the HTML to display the logo with a link. The control retrieves the logo (logo's url) from the library and the link target form the actual site's PropertyBag. So the last step would be to replace the old logo control with your new one.