master-pages SharePoint2010- Show content - sharepoint

I have created a new master page to SharePoint 2010. Right now I'm just trying to make it work. I want to display who modified the page and when. This works great whit this code:
<SharePointWebControls:DateTimeField FieldName="Modified" runat="server" ControlMode="Display"/>
by
<SharePointWebControls:UserField FieldName="Modified By" runat="server" ControlMode="Display"/>
But my problem is that when i Load the SP-page with my master-Page this part of the page stays for 0.5 seconds and then disappears. My question is: Do you know how I can make the modified and modified by content to stay on my site?
Thanks for your help!

The Answer to my Question was that I had to put the cod from the question before this tag:
<asp:ContentPlaceHolder id="PlaceHolderFormDigest" runat="server">
so my finished cod looks like this:
<!-- Footer with Last modified/modified by and date of the day -->
<div class="s4-notdlg" style="clear:both; background-color:white; padding:10px; margin-left:160px;">
<div class="hide">
<div>
Idag är det
<script type="text/javascript">
var date = new Date();
document.write(date.toLocaleDateString());
</script>
</div>
Senast uppdaterat:
<SharePointWebControls:DateTimeField ID="DateTimeField1" FieldName="Modified" runat="server" ControlMode="Display"/> av
<SharePointWebControls:UserField ID="UserField1" FieldName="Modified By" runat="server" ControlMode="Display"/>
</div>
</div>
<SharePoint:DeveloperDashboard ID="DeveloperDashboard1" runat="server"/>
</div>

Related

Hide text of search box in sharepoint

I want to hide the text of a searchtextbox, but I don't know how to do it. I'm a Sharepoint noob, so I think it is easy to do it but I don't know how... I put my code below, hope it helps:
<SharePoint:AjaxDelta ID="DeltaSiteLogo" runat="server" BlockElement="True">
<!--search-->
<SharePoint:AjaxDelta ID="DeltaPlaceHolderSearchArea" BlockElement="true" CssClass="ms-mpSearchBox ms-floatRight" runat="server">
<asp:ContentPlaceHolder ID="PlaceHolderSearchArea" runat="server">
<div id="searchInputBox">
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" />
<script type="text/javascript">
setTimeout(function () {
document.getElementById('SmallSearchInputBox').placeholder = 'Ex: SMS1234';
document.getElementById('SmallSearchInputBox').value = 'Ex: SMS1234';
}, 800);//time to wait for in ms
</script>
</div>
</asp:ContentPlaceHolder>
</SharePoint:AjaxDelta>
<SharePoint:SPLinkButton runat="server" CssClass="ms-siteicon-a" ID="x36d5bee949a7480783b3afc048c15598" NavigateUrl="~sitecollection/Pages/Inicio.aspx">
<SharePoint:SiteLogoImage name="onetidHeadbnnr0" runat="server" CssClass="ms-siteicon-img" ID="x74bbee6762f840edad4fe46f496d8c78" LogoImageUrl="/_layouts/15/images/siteIcon.png"></SharePoint:SiteLogoImage>
</SharePoint:SPLinkButton>
I follow this link, but this solution didn't work for me and It doesn't change the text of the textbox:
Can anyone help me? Thanks a lot!
The control ID will change as page inherit, for example:
Try to use jQuery regex selector, for example:
$('div[id*="SmallSearchInputBox"]')

Kentico cms:FormSubmit localization and layout html

I've created a Form, with the following layout:
<fieldset class="form-group subject">
<legend>Subject</legend>
<cms:FormLabel runat="server" ID="lTextBoxControl" Field="TextBoxControl" /><cms:FormErrorLabel runat="server" ID="eTextBoxControl" Field="TextBoxControl" />
<cms:FormControl runat="server" ID="iTextBoxControl" Field="TextBoxControl" FormControlName="TextBoxControl" CssClass="" />
</fieldset>
<fieldset class="form-group message">
<legend>Message</legend>
<cms:FormLabel runat="server" ID="labelMessage" Field="TextAreaControl" /><cms:FormErrorLabel runat="server" ID="messageError" Field="TextAreaControl" />
<cms:FormControl runat="server" ID="iTextAreaControl" Field="TextAreaControl" FormControlName="TextAreaControl" CssClass="" />
</fieldset>
<cms:FormSubmit runat="server" ID="fSubmit" />
I have a localization string for the button label, but can't get that work. Also, when this rendors, it's wrapped in a TABLE tag which is a big issue too.
I can't see anything in the V9 documentation for this control either.
A little more digging and i came up with this : http://devnet.kentico.com/questions/custom-submit-button-text
Forms > General > Submit Button Text
I then used my localization string.

TYPO3 tx_news, issue with the position of widget.paginate

I have a problem with the widget.paginate position in the extension tx_news, i'm working in TYPO3 v. 6.1 FLUID/EXTBASE.
My problem is that it's showing the widget.paginate by default, inside the Templates/News/list.html in my list show UL tag. and i want it to be outside the UL tags, I have tryed to move it around, but then it make some big changes to my layout, or do not work at all.
see bottom of page - enter link description here
How can I show the paginate links/widget outside the UL and after it ?
My Templates/News/list.html code
{namespace n=Tx_News_ViewHelpers}
<f:layout name="General" />
<!--
=====================
Templates/News/List.html
-->
<f:section name="content">
<f:if condition="{news}">
<f:then>
<div class="news-list-view">
<ul class="cbp_tmtimeline {newsItem.type}{f:if(condition: newsItem.istopnews, then: ' topnews')}">
<f:if condition="{settings.hidePagination}">
<f:then>
<f:for each="{news}" as="newsItem">
<f:render partial="List/Item" arguments="{newsItem: newsItem, settings:settings}" />
</f:for>
</f:then>
<f:else>
<n:widget.paginate objects="{news}" as="paginatedNews" configuration="{settings.list.paginate}">
<f:for each="{paginatedNews}" as="newsItem">
<f:render partial="List/Item" arguments="{newsItem: newsItem, settings:settings}" />
</f:for>
</n:widget.paginate>
</f:else>
</f:if>
</ul>
</div>
</f:then>
<f:else>
<div class="no-news-found">
<f:translate key="list_nonewsfound" />
</div>
</f:else>
</f:if>
</f:section>
You can override the default Paginate Template and define your own Template
Add this to your TS template:
plugin.tx_news.settings.list.paginate.templatePath = YourNewTemplatePath.html
To know how the default template works, check out this Default Template for reference and modify your view accordingly.
If you trying to edit the default News List, change the default news path and write your FLUID template in that file:
plugin.tx_news.view.templateRootPath = YourNewTemplateNews.html
Close your tag before the widget. Of course, you'll have to make a few changes in your CSS to get what you want.
</ul>
<f:else>
<n:widget.paginate>.......
Hi i fix it in the Templates/News/list.html code
with this code.
{namespace n=Tx_News_ViewHelpers}
<f:layout name="General" />
<!--
=====================
Templates/News/List.html
-->
<f:section name="content">
<f:if condition="{news}">
<f:then>
<f:if condition="{settings.hidePagination}">
<f:then>
<f:for each="{news}" as="newsItem">
<f:render partial="List/Item" arguments="{newsItem: newsItem, settings:settings}" />
</f:for>
</f:then>
<f:else>
<n:widget.paginate objects="{news}" as="paginatedNews" configuration="{settings.list.paginate}">
<div class="news-list-view">
<ul class="cbp_tmtimeline {newsItem.type}{f:if(condition: newsItem.istopnews, then: ' topnews')}">
<f:for each="{paginatedNews}" as="newsItem">
<f:render partial="List/Item" arguments="{newsItem: newsItem, settings:settings}" />
</f:for>
</ul>
</div>
</n:widget.paginate>
</f:else>
</f:if>
</f:then>
<f:else>
<div class="no-news-found">
<f:translate key="list_nonewsfound" />
</div>
</f:else>
</f:if>
</f:section>

Ext.NET 2.0 how to get the value of datefield

I want to get from datefield. Ext.NET 2.0 is a little bit difficult to study.
This is a source of simple datefield.
<ext:DateField ID="DateField1" runat="server"
Vtype="daterange" FieldLabel="To" EnableKeyEvents="true" />
and I'd like to set the value on my Textbox.
myTextbox.setValue(App.MainContent_DateField1.getValue());
help!!
Just found the answer to this - using getRawValue() function
myTextbox.setValue(App.MainContent_DateField1.getRawValue());
I tested the basic scenario and it appears to work correctly.
You might need to call .format() to convert your DateField value into a nicely formatted string, but that is not required.
Here's a full sample demonstrating the scenario. Select a Date from the DateField, then click the Button. The DateField value will be copied to the TextField.
Example
<%# Page Language="C#" %>
<%# Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:DateField ID="DateField1" runat="server" />
<ext:TextField ID="TextField1" runat="server" />
<ext:Button
runat="server"
Text="Submit"
OnClientClick="TextField1.setValue(DateField1.getValue().format('d-M-Y'));"
/>
</form>
</body>
</html>

Multiple Foursquare 'save' buttons on one page

I am working on a site that displays a list of venues and would like to add a Foursquare 'save' button for each venue in the list. Is it possible to show multiple Foursquare 'save' buttons on a single page? I've tried creating multiple vCard blocks (one for each venue) and inserting a 'save' button in each block but the locations are not being picked up.
After inspecting the source of the widgets.js and widgets.asyncbundle.js I discovered that setting thedata-context atribute of the 'Save to Foursquare' button to the ID of the VCard will link these two. Like so:
<div id="hcard-Station-Amsterdam-Centraal" class="vcard">
<span class="fn">
<span class="given-name">Station Amsterdam Centraal</span>
</span>
<div class="adr">
<div class="street-address">stationsplein 15</div>
<span class="locality">Amsterdam</span>,
<span class="region">Amsterdam</span> ,
<span class="postal-code">1012AB</span>
</div>
</div>
<div id="hcard-Jaarbeursplein" class="vcard">
<span class="fn">
<span class="given-name">Jaarbeursplein</span>
</span>
<div class="adr">
<div class="street-address">Jaarbeursplein</div>
<span class="locality">Utrecht</span>,
<span class="region">Utrecht</span>,
<span class="postal-code">3521AL</span>
</div>
</div>
Save to foursquare
Save to foursquare
But for the fact that this isn't documented, it may be changed in the near future.
Try this with "data-vid":
<!-- Place this anchor tag where you want the button to go -->
<br />
All In PartyRadio StudioSave to foursquare
<br />
Sing Sing Music HallSave to foursquare
<br />
Retro KlubSave to foursquare
<br />
Tisza DokkSave to foursquare
<br />
Zöld Zsiráf KultúrpartSave to foursquare
<!-- Place this script somewhere after the anchor tag above. If you have multiple buttons, only include the script once. -->
<script type='text/javascript'>
(function() {
window.___fourSq = {"uid":"606"};
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = 'http://platform.foursquare.com/js/widgets.js';
s.async = true;
var ph = document.getElementsByTagName('script')[0];
ph.parentNode.insertBefore(s, ph);
})();
</script>
The in-progress docs for the save-to-foursquare widget are accessible # https://developer.foursquare.com/overview/widgets. They'll be cleaned up over time, but should be good enough to help this and future widget-related questions =).
In particular, documentation about the "data-context" attribute you need will be pushed to the linked page soon.

Resources