Dynamic Alt Description

Hi all,
Is it possible to pull the alt description for an image from
a database??
Any help appreciated.

this depends on how your "image" has been stored in the
database -- as long the stored infomation is actually the file path
to your image on the server, this image respectively it´s
related width/height/alt parameters are usually getting generated
"on the fly" and without having the possibility to change any of
those parameters after the event -- what does work in this case, is
adding the image´s description (if present in another related
field) like this: <span
title="dynamic_description_here">dynamic_image_here</span>.
But if you´re manually adding images to a certain
"WYSIWYG - field"
(usually a textarea having an advanced "editor" like
Tiny MCE attached) of
your CMS by means of e.g. a filebrowser, you should usually be able
to define the respective "alt" manually for each inserted
image.

Similar Messages

  • Dynamic task description in sap inbox displaying carriage returns as an * ?

    Hi All,
    I have a method in my business object whereby I dynamically create the description of the task for the sap inbox, ie. the description the user sees for the task in their sap inbox . 
    At first I built this description into an internal table of type tline.   I would have thought that each row of the table would begin on a new line but this did not happen.  The rows ran into each other but were seperated by a semi colon.
    Then  I included a carriage return (cl_abap_char_utilities=>cr_lf) at the end of each row.  This had the same output but instead of the semi colon, it output an asteriks.
    Then I concatenated all the output into a string and passed this to a FM which splits the string at the carriage return and outputs the table.  While this behaved as I wanted in a test program (i.e. new line for each row) , once I put the code in the business object, all the rows ran into each other again..
    So is anyone aware of a way in which you can dynamcially build the task description and maintain the formatting you require?
    I'd be very grateful if anyone could shed any light as I've been trying to get this going for a day and a half now and I'm about ready to give up!!
    Many thanks,
    Liz.

    I had same requirement of displaying mutiple lines of workitem description. I used the following method for achieving my functionality.
    Suppose multilineline text to displayed in the workitem description is:-
    Line 1-> This is the the test text method to display description in the user defined format
    Line 2-> which i want to show on my workitem to person approving the workitem.
    Line 3-> Hello ,,,,,,,,,,,,,,,,,,,how are u .............................................test test hello test.
    1> I stored the data in an internal table which has one field of type c length 200.
    2> I appened the data line by line into the table so that data is not overlapped and my format is maintained.
    i.e  Data : t_text   type table of ty_text,
                   w_text  type ty_text.
    w_text-line = Line1.
    appen w_text to t_text.
    clear w_text.
    w_text-line = Line2.
    appen w_text to t_text.
    clear w_text.
    w_text-line = Line3.
    appen w_text to t_text.
    clear w_text.
    3>  The internal table T_TEXT will have three lines of data.
    4> Now pass this table as it is on the workitem Description.It will display text as per ur format on the workitem description dynamically

  • How to hide the Alt description when you hover over your links?

    I was told that you have to have a description for images, links just about everything. But when I preview my website and hover over the links, a yellow box appears with the description of the images. How do I hide this?

    You are previewing with an old (very old?) version of IE, which is the only browser on earth that does what you describe.  All other browsers play by the rules and leave the alt attribute values alone (which is what they should do). 
    You can choose to ignore this, or 'kill' it by adding a title attribute that is empty, e.g.,
    <img alt="foo" title=""...
    By the way, you add alt attributes to images for accessibility reasons.  People who browse with images turned off (and there are some) or people who use screen assistive devices (screenreaders) need some indication that there is an image at the point where they are looking/reading.  Consequently, you would only want to add content to these alt attributes where it's important to the message of the page (i.e., a cosmetic-only image would just have an empty alt attribute value). And you only need these for images, not for any other page element....

  • Dynamic Structure description

    Hi folks,
    Can anyone knows how to get description about any structure dynamicaly?
    I mean to say in parameter we can pass any structure name and after execution it
    gives all information about that structure.
    like component name, search help attached with that component and from which component this search help belongs????????
    Please try to solve it
    i had tried with class CL_ABAP_STRUCTDESCR. but it's not much meaning ful.

    hi,
    check the table STXH AND STXL .................................
    THESE are the tables standard sap providing to find the descriptions of the text ............
    thanks,
    reward if helpful.

  • How to put Dynamic Query description based on the Input selections?

    Hi All,
    I have a requirement wherien there will be 4 input selections for a report namely A, B, C & D alongwith Fiscal year period. wherin Fiscal Year period will be mandatory field
    Now, the output of the report should show the description of the report as follows:
    For E.g: if Fiscal year Period = 011/2011
    When User Enters input value for 'A', then report nameshould be displayed as A 011/2011
    When User Enters input value for 'B', then report nameshould be displayed as B 011/2011
    When User Enters input value for 'C', then report nameshould be displayed as C 011/2011
    When User Enters input value for 'D', then report nameshould be displayed as  D 011/2011
    Please advice if this requirement is possible and if yes, please guide me how?
    Thanks& Regards
    Sneha Santhanakrishnan

    change the code as below and see
    WHEN 'ZREP_DESC'.
    data: wa_data TYPE rrrangesid.
          CLEAR : wa_var_range.
          READ TABLE i_t_var_range INTO wa_var_range WITH KEY vnam = 'ZVALUE'.   "ZVALUE is variable for A,B,C,D field
          l_no = wa_var_range-low.
          CLEAR wa_var_range.
          READ TABLE i_t_var_range INTO wa_var_range WITH KEY vnam = 'ZFISCPER' iobjnm = '0FISCPER'.
          IF wa_var_range-low IS NOT INITIAL.
            gv_var  =  wa_var_range-low.
    concatenate l_no  gv_var into wa_data-low
          ENDIF.
          wa_data-sign = 'I'.
          wa_data-opt = 'BT'.
          APPEND wa_data TO e_t_range.
      ENDCASE.

  • How to identify black and white images for dynamic collection ?

    Hello
    I would like to make a dynamic collection to quickly find my black & white pictures. It is very easy to do with your original files which have undergone a black and white (Grey) conversion under the developpement module : you have to specify "treatment - is - Grey level" in the dynamic collection description.
    But what about original Grey levels images ? I have some scans of black and white negatives, and I would like to see them in the same collection.
    I have tried to use EXIF metada, but none of them is related to this information (neither does IPTC). But such images are well detected as Grey levels images in the development module...
    I don't know how to do (unless manually tagging images of course).
    Does anybody have a clue for an automated solution ?
    Thanks
    Erwann

    yes Eclipse 2.0 provides runtime chartting.
    Please refer to this thread
    [chartting|Re: Charts won't appear in CR Viewer?]
    void AddChart(ReportClientDocument clientDoc, String chartTitle)
      ChartDefinition chartDefinition = new ChartDefinition();
      chartDefinition.setChartType(ChartType.group);
      IDataDefinition dataDefinition = clientDoc.getDataDefController().getDataDefinition();
      Fields conditionFields = new Fields();
      IField field = dataDefinition.getGroups().getGroup(0).getConditionField();
      conditionFields.addElement(field);
      chartDefinition.setConditionFields(conditionFields);
      Fields dataFields = new Fields();
      for (int i = 0; i < dataDefinition.getSummaryFields().size(); i++)
        IField summaryField = dataDefinition.getSummaryFields().getField(i);
        dataFields.addElement(summaryField); 
      chartDefinition.setDataFields(dataFields);
      ChartObject chartObject = new ChartObject();
      chartObject.setChartDefinition(chartDefinition);
      ChartStyleType chartStyleType = ChartStyleType.pie;
      AreaSectionKind chartPlacement = AreaSectionKind.pageHeader;
      chartObject.getChartStyle().setType(chartStyleType);
      chartObject.setChartReportArea(chartPlacement);
      chartObject.getChartStyle().getTextOptions().setTitle(chartTitle);
      chartObject.setHeight(5000);
      chartObject.setWidth(5000);
      chartObject.setTop(1000);
      IArea reportHeaderArea = reportDefController.getReportDefinition().getReportHeaderArea();
      Section chartSection =(Section)reportHeaderArea.getSections().getSection(0);
      clientDoc.getReportDefController().getReportObjectController().add(chartObject, chartSection, 1);
    Further you can format the fields as per your requirement.
    Hope this helps
    Regards,
    Tej

  • Will search engines read the alt= text for a banner image within the h1 tag?

    I read where the search engines focus on the text within the
    header h1 tags. If I'm using a graphic that contains this important
    introductory info (as apposed to text), and put the text in the
    alt= section of the image, will the search engines us this text in
    the alt section of the image?

    Depends. I have a logo on my site with an alt description
    "orange kitten
    playing with planet Earth"
    Yahoo Web: My home page is #1
    Google Images: The image is #1
    Google Web: nada
    --Nancy O.
    Alt-Web Design & Publishing
    www.alt-web.com
    "Walt F. Schaefer" <[email protected]> wrote in
    message
    news:[email protected]...
    > I would speculate that if the words and phrases in those
    alt tags do NOT
    > appear elsewhere in the actual text (on that page) even
    those SEs that
    read
    > the alt tags will likely ignore them.
    >
    > --
    >
    > Walt
    >
    >
    > "Nancy O" <[email protected]> wrote in
    message
    > news:[email protected]...
    > > Yes and no.
    > >
    > > Do assign ALT description to your images. Screen
    readers, which are
    used
    > > by
    > > many visually impaired Web users, can't understand
    images. To ensure
    > > accessibility, an alternative description needs to
    be assigned to every
    > > image; the screen reader will read out this
    alternative, or ALT="image
    > > description goes here."
    > >
    > > Like screen readers, search engines are commonly
    assumed to be unable to
    > > understand images. But some search engines index
    ALT text. By assigning
    > > ALT
    > > text to your images, those engines will be able to
    understand even your
    > > pictorial content.
    > >
    > > Of course, numerous search engines don't take any
    notice of ALT text.
    The
    > > proliferation of ALT tag spamming undermined the
    relevance of ALT text
    in
    > > the eyes of these engines, which no longer consider
    it in their
    relevance
    > > algorithms.
    > >
    > > So, why bother with image ALT text? Because your
    rankings may improve in
    > > search engines that do take it into account, and it
    makes your site more
    > > accessible.
    > >
    > > --Nancy O.
    > > Alt-Web Design & Publishing
    > > www.alt-web.com
    > >
    > >
    > >
    > > "brainfillet" <[email protected]>
    wrote in message
    > > news:[email protected]...
    > >> I read where the search engines focus on the
    text within the header h1
    > > tags.
    > >> If I'm using a graphic that contains this
    important introductory info
    (as
    > >> apposed to text), and put the text in the alt=
    section of the image,
    will
    > > the
    > >> search engines us this text in the alt section
    of the image?
    > >>
    > >
    > >
    >
    >

  • Enabling alt-text pop ups

    While I generally use Firefox, one of the features I find useful in Internet Explorer 8 is that "alt text" appears as a small popup on mouse-over. I've searched Firefox and Firefox Help to see if there was a feature that could be enabled for this, but have not found any references at all to alt-text. Can Firefox show "alt text"? If not, is there an add-on? If not, please submit this as a suggested feature to add in future releases.

    title= was introduced later for images, and Firefox being the stickler for standards will show the title but not the alt="descriptive text"
    The alt= is what shows if the image does not appear (no found, for instance),, it was/became a requirement because it supposedly would help blind people read the pictures -- that was dropped (there are better methods) and so was the requirement that alt= be always used. The two are not the same thing.
    If you want to show Alt= in addition to titles there is an extension, it is messy and I believe one I tried placed a tooltip that couldn't be dismissed once you moused over it -- I'm sure it improved or others have done better. Anyone writing code now should certainly be using title.

  • Add Description on each port

    Hi,
    Though it might sounds stupid but I am wondering if there is anyway to dynamically add description of each port.
    What I am trying to achieve is port 1 of Switch A is connected to Port 2 of Switch B.
    I want to add description on port 1 of Switch A to provide the information of destination device like IP of the destination device or MAC address or name of the device (end device could be cisco switch or server).
    I know how to hard quote the description of each port but the problem is down the raw   if someone change the up link port on switch B from port 2 to port 3 than description on port 2 would be invalid.
    So I am looking for a way to get the Switch B (destination device) information(IP/MAC/ hostname/ etc) and plug it into description of port 1 of Switch A.
    I am hoping there must be a way of doing this.
    I need your help and expertise.
    Thanks in advance

    Hi Arshad,
    Just to see what can be done,  I added the following text to my uplink port (port 10)  on my SG300-10P  ( ordering p/n SRW2008P-K9-NA)
    "uplink to my UC520 [2001:1:1:1::300]" 
    As you may or may not see from the screen shot below,  I am managing my SG300 switch via a IPv6 or a IPv4 IP address and added that information to the port description.
    The text came up when I clicked on switch port 10.
    Hope this helps,
    regards Dave

  • Fade image javascript?

    I've used the JavaScript below for many years as a way to do
    a simple fading image effect on my sites. Now I've found that when
    I use PVII PMM on the same page as this Javascript that the fly-out
    menus in the navigation do not work.
    Is there something I need to change in the code? And/or does
    anyon have any suggestions (other than Flash) for doing a simple
    effect of fading from one image to the next?
    Here's the script I've been using for the fading images:
    <script language="JavaScript1.2">
    //Fade-in image slideshow- By Dynamic Drive
    //For full source code and more DHTML scripts, visit
    http://www.dynamicdrive.com
    //This credit MUST stay intact for use
    var slideshow_width='140px' //SET IMAGE WIDTH
    var slideshow_height='225px' //SET IMAGE HEIGHT
    var pause=3000 //SET PAUSE BETWEEN SLIDE (3000=3 seconds)
    var fadeimages=new Array()
    //SET IMAGE PATHS. Extend or contract array as needed
    fadeimages[0]="photo1.jpg"
    fadeimages[1]="photo2.jpg"
    fadeimages[2]="photo3.jpg"
    ////NO need to edit beyond here/////////////
    var preloadedimages=new Array()
    for (p=0;p<fadeimages.length;p++){
    preloadedimages[p]=new Image()
    preloadedimages[p].src=fadeimages[p]
    var ie4=document.all
    var dom=document.getElementById
    if (ie4||dom)
    document.write('<div
    style="position:relative;width:'+slideshow_width+';height:'+slideshow_height+';overflow:h idden"><div
    id="canvas0"
    style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;left :0;filter:alpha(opacity=10);-moz-opacity:10"></div><div
    id="canvas1"
    style="position:absolute;width:'+slideshow_width+';height:'+slideshow_height+';top:0;left :0;filter:alpha(opacity=10);-moz-opacity:10"></div></div>')
    else
    document.write('<img name="defaultslide"
    src="'+fadeimages[0]+'">')
    var curpos=10
    var degree=10
    var curcanvas="canvas0"
    var curimageindex=0
    var nextimageindex=1
    function fadepic(){
    if (curpos<100){
    curpos+=10
    if (tempobj.filters)
    tempobj.filters.alpha.opacity=curpos
    else if (tempobj.style.MozOpacity)
    tempobj.style.MozOpacity=curpos/100
    else{
    clearInterval(dropslide)
    nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
    tempobj=ie4? eval("document.all."+nextcanvas) :
    document.getElementById(nextcanvas)
    tempobj.innerHTML='<img
    src="'+fadeimages[nextimageindex]+'">'
    nextimageindex=(nextimageindex<fadeimages.length-1)?
    nextimageindex+1 : 0
    setTimeout("rotateimage()",pause)
    function rotateimage(){
    if (ie4||dom){
    resetit(curcanvas)
    var crossobj=tempobj=ie4? eval("document.all."+curcanvas) :
    document.getElementById(curcanvas)
    crossobj.style.zIndex++
    var temp='setInterval("fadepic()",50)'
    dropslide=eval(temp)
    curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
    else
    document.images.defaultslide.src=fadeimages[curimageindex]
    curimageindex=(curimageindex<fadeimages.length-1)?
    curimageindex+1 : 0
    function resetit(what){
    curpos=10
    var crossobj=ie4? eval("document.all."+what) :
    document.getElementById(what)
    if (crossobj.filters)
    crossobj.filters.alpha.opacity=curpos
    else if (crossobj.style.MozOpacity)
    crossobj.style.MozOpacity=curpos/100
    function startit(){
    var crossobj=ie4? eval("document.all."+curcanvas) :
    document.getElementById(curcanvas)
    crossobj.innerHTML='<img
    src="'+fadeimages[curimageindex]+'">'
    rotateimage()
    if (ie4||dom)
    window.onload=startit
    else
    setInterval("rotateimage()",pause)
    </script>
    <p align="center"><font face="Arial"
    size="-2">Free DHTML scripts provided by<br>
    <a href="
    http://www.dynamicdrive.com">Dynamic
    Drive</a></font></p>
    -Jesse

    Download the Cycle plug-in script and save it to your local site folder.  I prefer to keep scripts in my Scripts folder but that's up to you.
    http://jquery.malsup.com/cycle/download.html
    jQuery has 3 basic parts to it:
    the core code library which you ref in your <head>
    the plug-in script & css (if any) which you ref in your <head>
    the function code inside <script> tags -- I prefer to put this above closing </body> tag.
    <head>
    <!-- jQuery latest core library -->
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js">
    </script>
    <!-- Cycle plugin -->
    <script type="text/javascript" src="Scripts/jquery.cycle.all.latest.js"></script>
    </head>
    <body>
    <div class="slideshow">
         <img src="image1.jpg" width="200" height="200" alt="description" />
         <img src="image2.jpg" width="200" height="200" alt="description" />
         <img src="image3.jpg" width="200" height="200" alt="description" />
         <img src="image4.jpg" width="200" height="200" alt="description" />
    </div>
    <!--Cycle function code-->
    <script type="text/javascript">
    $(document).ready(function() {
        $('.slideshow').cycle({
    fx: 'fade'
    </script>
    </body>
    That's all there is to it.  If you want anything fancier, look at Cycle's More Demos & Examples near the bottom of their home page.
    Nancy O.

  • Need Help on powershell Script to send mails in different languages

    Hello, Just wanted to use the script below to remind users of password expiry date (I got it from internet New-Passwordreminder.ps1). We have companies in many countries, so the email should be in the language of that country. So since our users are in different
    OU's according to countries, I thought some one could help me edit this script and say if the user is in AB ou then email in english will be sent, if in BC ou then the email will be in Russian....So in the script I will have all the languages I need
    to have written.
    <#
    .SYNOPSIS
      Notifies users that their password is about to expire.
    .DESCRIPTION
        Let's users know their password will soon expire. Details the steps needed to change their password, and advises on what the password policy requires. Accounts for both standard Default Domain Policy based password policy and the fine grain
    password policy available in 2008 domains.
    .NOTES
        Version            : v2.6 - See changelog at
    http://www.ehloworld.com/596
        Wish list      : Better detection of Exchange server
                  : Set $DaysToWarn automatically based on Default Domain GPO setting
                  : Description for scheduled task
                  : Verify it's running on R2, as apparently only R2 has the AD commands?
                  : Determine password policy settings for FGPP users
                  : better logging
        Rights Required   : local admin on server it's running on
        Sched Task Req'd  : Yes - install mode will automatically create scheduled task
        Lync Version    : N/A
        Exchange Version  : 2007 or later
        Author           : M. Ali (original AD query), Pat Richard, Exchange MVP
        Email/Blog/Twitter :
    [email protected]  http://www.ehloworld.com @patrichard
        Dedicated Post   :
    http://www.ehloworld.com/318
        Disclaimer       : You running this script means you won't blame me if this breaks your stuff.
        Info Stolen from   : (original)
    http://blogs.msdn.com/b/adpowershell/archive/2010/02/26/find-out-when-your-password-expires.aspx
                  : (date)
    http://technet.microsoft.com/en-us/library/ff730960.aspx
                : (calculating time)
    http://blogs.msdn.com/b/powershell/archive/2007/02/24/time-till-we-land.aspx
    http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/23fc5ffb-7cff-4c09-bf3e-2f94e2061f29/
    http://blogs.msdn.com/b/adpowershell/archive/2010/02/26/find-out-when-your-password-expires.aspx
                : (password decryption)
    http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/f90bed75-475e-4f5f-94eb-60197efda6c6/
                : (determine per user fine grained password settings)
    http://technet.microsoft.com/en-us/library/ee617255.aspx
    .LINK    
        http://www.ehloworld.com/318
    .INPUTS
      None. You cannot pipe objects to this script
    .PARAMETER Demo
      Runs the script in demo mode. No emails are sent to the user(s), and onscreen output includes those who are expiring soon.
    .PARAMETER Preview
      Sends a sample email to the user specified. Usefull for testing how the reminder email looks.
    .PARAMETER PreviewUser
      User name of user to send the preview email message to.
    .PARAMETER Install
      Create the scheduled task to run the script daily. It does NOT create the required Exchange receive connector.
    .EXAMPLE
      .\New-PasswordReminder.ps1
      Description
      Searches Active Directory for users who have passwords expiring soon, and emails them a reminder with instructions on how to change their password.
    .EXAMPLE
      .\New-PasswordReminder.ps1 -demo
      Description
      Searches Active Directory for users who have passwords expiring soon, and lists those users on the screen, along with days till expiration and policy setting
    .EXAMPLE
      .\New-PasswordReminder.ps1 -Preview -PreviewUser [username]
      Description
      Sends the HTML formatted email of the user specified via -PreviewUser. This is used to see what the HTML email will look like to the users.
    .EXAMPLE
      .\New-PasswordReminder.ps1 -install
      Description
      Creates the scheduled task for the script to run everyday at 6am. It will prompt for the password for the currently logged on user. It does NOT create the required Exchange receive connector.
    #>
    #Requires -Version 2.0
    [cmdletBinding(SupportsShouldProcess = $true)]
    param(
     [parameter(ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
     [switch]$Demo,
     [parameter(ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
     [switch]$Preview,
     [parameter(ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
     [switch]$Install,
     [parameter(ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
     [string]$PreviewUser
    Write-Verbose "Setting variables"
    [string]$Company = "Contoso Ltd"
    [string]$OwaUrl = "https://mail.contoso.com"
    [string]$PSEmailServer = "10.9.0.11"
    [string]$EmailFrom = "Help Desk <[email protected]>"
    [string]$HelpDeskPhone = "(586) 555-1010"
    [string]$HelpDeskURL = "https://intranet.contoso.com/"
    [string]$TranscriptFilename = $MyInvocation.MyCommand.Name + " " + $env:ComputerName + " {0:yyyy-MM-dd hh-mmtt}.log" -f (Get-Date)
    [int]$global:UsersNotified = 0
    [int]$DaysToWarn = 14
    [string]$ImagePath = "http://www.contoso.com/images/new-passwordreminder.ps1"
    [string]$ScriptName = $MyInvocation.MyCommand.Name
    [string]$ScriptPathAndName = $MyInvocation.MyCommand.Definition
    [string]$ou
    [string]$DateFormat = "d"
    if ($PreviewUser){
     $Preview = $true
    Write-Verbose "Defining functions"
    function Set-ModuleStatus {
     [cmdletBinding(SupportsShouldProcess = $true)]
     param (
      [parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true, HelpMessage = "No module name specified!")]
      [string]$name
     if(!(Get-Module -name "$name")) {
      if(Get-Module -ListAvailable | ? {$_.name -eq "$name"}) {
       Import-Module -Name "$name"
       # module was imported
       return $true
      } else {
       # module was not available (Windows feature isn't installed)
       return $false
     }else {
      # module was already imported
      return $true
    } # end function Set-ModuleStatus
    function Remove-ScriptVariables { 
     [cmdletBinding(SupportsShouldProcess = $true)]
     param($path)
     $result = Get-Content $path | 
     ForEach { if ( $_ -match '(\$.*?)\s*=') {     
       $matches[1]  | ? { $_ -notlike '*.*' -and $_ -notmatch 'result' -and $_ -notmatch 'env:'} 
     ForEach ($v in ($result | Sort-Object | Get-Unique)){  
      Remove-Variable ($v.replace("$","")) -ErrorAction SilentlyContinue
    } # end function Get-ScriptVariables
    function Install {
     [cmdletBinding(SupportsShouldProcess = $true)]
     param()
    http://technet.microsoft.com/en-us/library/cc725744(WS.10).aspx
     $error.clear()
     Write-Host "Creating scheduled task `"$ScriptName`"..."
     $TaskPassword = Read-Host "Please enter the password for $env:UserDomain\$env:UserName" -AsSecureString
     $TaskPassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($TaskPassword))
     # need to fix the issue with spaces in the path
     schtasks /create /tn $ScriptName /tr "$env:windir\system32\windowspowershell\v1.0\powershell.exe -psconsolefile '$env:ExchangeInstallPath\Bin\exshell.psc1' -command $ScriptPathAndName" /sc Daily /st 06:00 /ru $env:UserDomain\$env:UserName /rp
    $TaskPassword | Out-Null
     if (!($error)){
      Write-Host "done!" -ForegroundColor green
     }else{
      Write-Host "failed!" -ForegroundColor red
     exit
    } # end function Install
    function Get-ADUserPasswordExpirationDate {
     [cmdletBinding(SupportsShouldProcess = $true)]
     Param (
      [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true, HelpMessage = "Identity of the Account")]
      [Object]$accountIdentity
     PROCESS {
      Write-Verbose "Getting the user info for $accountIdentity"
      $accountObj = Get-ADUser $accountIdentity -properties PasswordExpired, PasswordNeverExpires, PasswordLastSet, name, mail
      # Make sure the password is not expired, and the account is not set to never expire
        Write-Verbose "verifying that the password is not expired, and the user is not set to PasswordNeverExpires"
        if (((!($accountObj.PasswordExpired)) -and (!($accountObj.PasswordNeverExpires))) -or ($PreviewUser)) {
         Write-Verbose "Verifying if the date the password was last set is available"
         $passwordSetDate = $accountObj.PasswordLastSet      
          if ($passwordSetDate -ne $null) {
           $maxPasswordAgeTimeSpan = $null
            # see if we're at Windows2008 domain functional level, which supports granular password policies
            Write-Verbose "Determining domain functional level"
            if ($global:dfl -ge 4) { # 2008 Domain functional level
              $accountFGPP = Get-ADUserResultantPasswordPolicy $accountObj
              if ($accountFGPP -ne $null) {
               $maxPasswordAgeTimeSpan = $accountFGPP.MaxPasswordAge
         } else {
          $maxPasswordAgeTimeSpan = (Get-ADDefaultDomainPasswordPolicy).MaxPasswordAge
        } else { # 2003 or ealier Domain Functional Level
         $maxPasswordAgeTimeSpan = (Get-ADDefaultDomainPasswordPolicy).MaxPasswordAge
        if ($maxPasswordAgeTimeSpan -eq $null -or $maxPasswordAgeTimeSpan.TotalMilliseconds -ne 0) {
         $DaysTillExpire = [math]::round(((New-TimeSpan -Start (Get-Date) -End ($passwordSetDate + $maxPasswordAgeTimeSpan)).TotalDays),0)
         if ($preview){$DaysTillExpire = 1}
         if ($DaysTillExpire -le $DaysToWarn){
          Write-Verbose "User should receive email"
          $PolicyDays = [math]::round((($maxPasswordAgeTimeSpan).TotalDays),0)
          if ($demo) {Write-Host ("{0,-25}{1,-8}{2,-12}" -f $accountObj.Name, $DaysTillExpire, $PolicyDays)}
                # start assembling email to user here
          $EmailName = $accountObj.Name      
          $DateofExpiration = (Get-Date).AddDays($DaysTillExpire)
          $DateofExpiration = (Get-Date($DateofExpiration) -f $DateFormat)      
    Write-Verbose "Assembling email message"      
    [string]$emailbody = @"
    <html>
     <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     </head>
    <body>
     <table id="email" border="0" cellspacing="0" cellpadding="0" width="655" align="center">
      <tr>
       <td align="left" valign="top"><img src="$ImagePath/spacer.gif" alt="Description: $ImagePath/spacer.gif" width="46" height="28" align="absMiddle">
    if ($HelpDeskURL){     
    $emailbody += @" 
       <font style="font-size: 10px; color: #000000; line-height: 16px; font-family: Verdana, Arial, Helvetica, sans-serif">If this e-mail does not appear properly, please <a href="$HelpDeskURL" style="font-weight:
    bold; font-size: 10px; color: #cc0000; font-family: verdana, arial, helvetica, sans-serif; text-decoration: underline">click here</a>.</font>
    $emailbody += @"   
       </td>
      </tr>
      <tr>
    if ($HelpDeskURL){  
    $emailbody += @"
       <td height="121" align="left" valign="bottom"><a href="$HelpDeskURL"><img src="$ImagePath/header.gif" border="0" alt="Description: $ImagePath/header.gif"
    width="655" height="121"></a></td>
    }else{
    $emailbody += @" 
       <td height="121" align="left" valign="bottom"><img src="$ImagePath/header.gif" border="0" alt="Description: $ImagePath/header.gif" width="655" height="121"></td>
    $emailbody += @"
      </tr>
      <tr>
       <td>
        <table id="body" border="0" cellspacing="0" cellpadding="0">
         <tr>
          <td width="1" align="left" valign="top" bgcolor="#a8a9ad"><img src="$ImagePath/spacer50.gif" alt="Description: $ImagePath/spacer50.gif" width="1"
    height="50"></td>
          <td><img src="$ImagePath/spacer.gif" alt="Description: $ImagePath/spacer.gif" width="46" height="106"></td>
          <td id="text" width="572" align="left" valign="top" style="font-size: 12px; color: #000000; line-height: 17px; font-family: Verdana, Arial, Helvetica, sans-serif">
    if ($DaysTillExpire -le 1){
     $emailbody += @"
      <div align='center'>
       <table border='0' cellspacing='0' cellpadding='0' style='width:510px; background-color: white; border: 0px;'>
        <tr>
         <td align='right'><img width='36' height='28' src='$ImagePath/image001b.gif' alt='Description: $ImagePath/image001b.gif'></td> 
         <td style="font-family: verdana; background: #E12C10; text-align: center; padding: 0px; font-size: 9.0pt; color: white">ALERT: You must change your password today or you will be locked out!</td>  
         <td align='left'><img border='0' width='14' height='28' src='$ImagePath/image005b.gif' alt='Description: $ImagePath/image005b.gif'></td>
        </tr>
       </table>
      </div>
    $emailbody += @"
       <p style="font-weight: bold">Hello, $EmailName,</p>
       <p>It's change time again! Your $company password expires in <span style="background-color: red; color: white; font-weight: bold;">&nbsp;$DaysTillExpire&nbsp;</span> day(s), on $DateofExpiration.</p>
       <p>Please use one of the methods below to update your password:</p>
       <ol>
        <li>$company office computers and Terminal Server users: You may update your password on your computer by pressing Ctrl-Alt-Delete and selecting 'Change Password' from the available options. If you use a $company laptop in addition
    to a desktop PC, be sure and read #3 below.</li>
        <li>Remote Outlook Client, Mac, and/or Outlook Web App users: If you only access our email system, please use the following method to easily change your password:</li>
        <ul>
         <li>Log into <a href="$owaurl">Outlook Web App</a> using Internet Explorer (PC) or Safari or Firefox (Mac).</li>
         <li>Click on the Options button in the upper right corner of the page.</li>  
         <li>Select the &quot;Change Password&quot; link to change your password.</li>
         <li>Enter your current password, then your new password twice, and click Save</li>
         <li><span style="font-weight: bold">NOTE:</span> You will now need to use your new password when logging into Outlook Web App, Outlook 2010, SharePoint, Windows Mobile (ActiveSync) devices, etc. Blackberry
    Enterprise Users (BES) will not need to update their password. Blackberry Internet Service (BIS) users will be required to use their new password on their device.</li>
        </ul>
        <li>$company issued laptops: If you have been issued a $company laptop, you must be in a corporate office and directly connected to the company network to change your password. If you also use a desktop PC in the office, you must
    remember to always update your domain password on the laptop first. Your desktop will automatically use the new password.</li>
        <ul>
         <li>Log in on laptop</li>
         <li>Press Ctrl-Alt-Delete and select 'Change Password' from the available options.</li>
         <li>Make sure your workstation (if you have one) has been logged off any previous sessions so as to not cause conflict with your new password.</li>
        </ul>
       </ol>
       <p>Think you've got a complex password? Run it through the <a href="The">http://www.passwordmeter.com/">The Password Meter</a></p>
       <p>Think your password couldn't easily be hacked? See how long it would take: <a href="How">http://howsecureismypassword.net/">How Secure Is My Password</a></p>
       <p>Remember, if you do not change your password before it expires on $DateofExpiration, you will be locked out of all $company Computer Systems until an Administrator unlocks your account.</p>
       <p>If you are traveling or will not be able to bring your laptop into the office before your password expires, please call the number below for additional instructions.</p>
       <p>You will continue to receive these emails daily until the password is changed or expires.</p>
       <p>Thank you,<br />
       The $company Help Desk<br />
       $HelpDeskPhone</p>
    if ($accountFGPP -eq $null){
     $emailbody += @"
       <table style="background-color: #dedede; border: 1px solid black">
        <tr>
         <td style="font-size: 12px; color: #000000; line-height: 17px; font-family: Verdana, Arial, Helvetica, sans-serif"><b>$company Password Policy</b>
          <ul>
           <li>Your password must have a minimum of a $MinPasswordLength characters.</li>
           <li>You may not use a previous password.</li>
           <li>Your password must not contain parts of your first, last, or logon name.</li>
           <li>Your password must be changed every $PolicyDays days.</li>
    if ($PasswordComplexity){
     Write-Verbose "Password complexity"
     $emailbody += @"
           <li>Your password requires a minimum of two of the following three categories:</li>
           <ul>
            <li>1 upper case character (A-Z)</li>
            <li>1 lower case character (a-z)</li>
            <li>1 numeric character (0-9)</li>        
           </ul>
    $emailbody += @"
           <li>You may not reuse any of your last $PasswordHistory passwords</li>
          </ul>
         </td>
        </tr>
       </table>
    $emailbody += @"        
           </td>
           <td width="49" align="left" valign="top"><img src="$ImagePath/spacer50.gif" alt="" width="49" height="50"></td>
           <td width="1" align="left" valign="top" bgcolor="#a8a9ad"><img src="$ImagePath/spacer50.gif" alt="Description: $ImagePath/spacer50.gif" width="1"
    height="50"></td>
          </tr>
         </table>
         <table id="footer" border="0" cellspacing="0" cellpadding="0" width="655">
          <tr>
           <td><img src="$ImagePath/footer.gif" alt="Description: $ImagePath/footer.gif" width="655" height="81"></td>
          </tr>
         </table>
         <table border="0" cellspacing="0" cellpadding="0" width="655" align="center">
          <tr>
           <td align="left" valign="top"><img src="$ImagePath/spacer.gif" alt="Description: $ImagePath/spacer.gif" width="36" height="1"></td>
           <td align="middle" valign="top"><font face="Verdana" size="1" color="#000000"><p>This email was sent by an automated process.
    if ($HelpDeskURL){
    $emailbody += @"               
           If you would like to comment on it, please visit <a href="$HelpDeskURL"><font color="#ff0000"><u>click here</u></font></a>
    $emailbody += @"               
            </p><p style="color: #009900;"><font face="Webdings" size="4">P</font> Please consider the environment before printing this email.</p></font>
           </td>
           <td align="left" valign="top"><img src="$ImagePath/spacer.gif" alt="Description: $ImagePath/spacer.gif" width="36" height="1"></td>
          </tr>
         </table>
        </td>
       </tr>
      </table>
     </body>
    </html>
          if (!($demo)){
           $emailto = $accountObj.mail
           if ($emailto){
            Write-Verbose "Sending demo message to $emailto"
            Send-MailMessage -To $emailto -Subject "Your password expires in $DaysTillExpire day(s)" -Body $emailbody -From $EmailFrom -Priority High -BodyAsHtml
            $global:UsersNotified++
           }else{
            Write-Verbose "Can not email this user. Email address is blank"
    } # end function Get-ADUserPasswordExpirationDate
    if ($install){
     Write-Verbose "Install mode"
     Install
    Write-Verbose "Checking for ActiveDirectory module"
    if ((Set-ModuleStatus ActiveDirectory) -eq $false){
     $error.clear()
     Write-Host "Installing the Active Directory module..." -ForegroundColor yellow
     Set-ModuleStatus ServerManager
     Add-WindowsFeature RSAT-AD-PowerShell
     if ($error){
      Write-Host "Active Directory module could not be installed. Exiting..." -ForegroundColor red;
      if ($transcript){Stop-Transcript}
      exit
    Write-Verbose "Getting Domain functional level"
    $global:dfl = (Get-AdDomain).DomainMode
    # Get-ADUser -filter * -properties PasswordLastSet,EmailAddress,GivenName -SearchBase "OU=Users,DC=domain,DC=test" |foreach {
    if (!($PreviewUser)){
     if ($ou){
      Write-Verbose "Filtering users to $ou"
      $users = Get-AdUser -filter * -SearchScope subtree -SearchBase $ou -ResultSetSize $null
     }else{
      $users = Get-AdUser -filter * -ResultSetSize $null
    }else{
     Write-Verbose "Preview mode"
     $users = Get-AdUser $PreviewUser
    if ($demo){
     Write-Verbose "Demo mode"
     # $WhatIfPreference = $true
     Write-Host "`n"
     Write-Host ("{0,-25}{1,-8}{2,-12}" -f "User", "Expires", "Policy") -ForegroundColor cyan
     Write-Host ("{0,-25}{1,-8}{2,-12}" -f "========================", "=======", "===========") -ForegroundColor cyan
    Write-Verbose "Setting event log configuration"
    $evt = new-object System.Diagnostics.EventLog("Application")
    $evt.Source = $ScriptName
    $infoevent = [System.Diagnostics.EventLogEntryType]::Information
    $EventLogText = "Beginning processing"
    $evt.WriteEntry($EventLogText,$infoevent,70)
    Write-Verbose "Getting password policy configuration"
    $DefaultDomainPasswordPolicy = Get-ADDefaultDomainPasswordPolicy
    [int]$MinPasswordLength = $DefaultDomainPasswordPolicy.MinPasswordLength
    # this needs to look for FGPP, and then default to this if it doesn't exist
    [bool]$PasswordComplexity = $DefaultDomainPasswordPolicy.ComplexityEnabled
    [int]$PasswordHistory = $DefaultDomainPasswordPolicy.PasswordHistoryCount
    ForEach ($user in $users){
     Get-ADUserPasswordExpirationDate $user.samaccountname
    Write-Verbose "Writing summary event log entry"
    $EventLogText = "Finished processing $global:UsersNotified account(s). `n`nFor more information about this script, run Get-Help .\$ScriptName. See the blog post at
    http://www.ehloworld.com/318."
    $evt.WriteEntry($EventLogText,$infoevent,70)
    # $WhatIfPreference = $false
    # Remove-ScriptVariables -path $MyInvocation.MyCommand.Name
    Remove-ScriptVariables -path $ScriptPathAndName

    Hi petro_jemes,
    Just a little claritification, you need to add the value to the variable "[string]$ou", and also change the language in the variable "$emailbody" in the function "Get-ADUserPasswordExpirationDate".
    I hope this helps.

  • Newbie Layout Help Needed

    I am normally an After Effects and Premiere Pro user but have been forced to volunteer for help on a Dreamweaver project. 
    The site is built on the template: HTML, 1 column fixed, centered, header and footer.  I want to be able to insert a photo the width of the main column, 960 px I think.  Then, under that photo, I want to insert 4 photos with different widths, between 150 and 200 pixels wide.  I will need to update this from time to time and the quantity and sizes of the photos will be different each time.  If "Draw AP Div" worked like I expected it to, it would be simple: draw boxes and insert images.  However, as you know, it's not going to be that easy.  I have read the formatting101 page and searched the forum but I guess I don't know enough to know what to search for.
    Is there a way to place images in the way I want to?  Do I need a plug-in?   I need to where to start. 

    You don't need APDivs for this.  If you want the secondary images to be evenly spaced on the page, use CSS floats & margins.
    http://alt-web.com/DEMOS/3-CSS-boxes.shtml
    If you don't need them evenly spaced, simply insert optimized images into your layout.  Be sure to resize images beforehand in your graphics editor so that their combined widths will fit inside the layout.
    <p style="text-align"center">
    <img src="top-image.jpg" width="xx" height="xx" alt="description">
    </p>
    <p style="text-align:center">
    <img src="image1.jpg" width="xx" height="xx" alt="description">  
    <img src="image2.jpg" width="xx" height="xx" alt="description">  
    <img src="image3.jpg" width="xx" height="xx" alt="description">  
    <img src="image4.jpg" width="xx" height="xx" alt="description">
    </p>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/

  • Problem with code need a little help

    change it and still comes up the same don;t understand what is wronge with it. new in codeing using dreamweaver c5
             Line 39,        Column 35:     document type does not allow element "div" here; assuming missing "object" start-tag    
    <div id="google_translate_element"><script type="text/javascript">
             Line 44,        Column 9:     end tag for "div" omitted, but OMITTAG NO was specified    
    </object></head>
    ✉  
             Line 39,        Column 1:     start tag was here    
    <div id="google_translate_element"><script type="text/javascript">
             Line 73,        Column 94:     required attribute "alt" not specified    
    …"><a href="index.html"><img src="bs2.jpg" width="97" height="109" /></a>   </p>

    1) It looks like you may have a <div> tag in your <head></head> section of the pages code which surrounds a <javascript> tag and its not allowed in there.
    2) You have missed out the alt="" on the image:
    img src="bs2.jpg" width="97" height="109" alt="Description here"/>
    Change this:
    <div id="google_translate_element"></div><script type="text/javascript">
    function googleTranslateElementInit() {
      new google.translate.TranslateElement({pageLanguage: 'en', autoDisplay: false}, 'google_translate_element');
    </script>
    To this:
    <script type="text/javascript">
    function googleTranslateElementInit() {
      new google.translate.TranslateElement({pageLanguage: 'en', autoDisplay: false}, 'google_translate_element');
    </script>

  • What is the easiest way to add a slide show to a dream weaver page?

    What is the easiest way to add a slide show to a dream weaver page?

    Copy & paste the following code into a new, blank document.  Change images to your own.  SaveAs test.html and preview in browsers. 
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 with Cycle2</title>
    <!--help for older IE browsers-->
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <!--Latest jQuery Core Library-->
    <script src="http://code.jquery.com/jquery-latest.min.js">
    </script>
    <!--Cycle2 Slideshow Plugin-->
    <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20130409/jquery.cycle2.min.js"></script>
    <style>
    /**Slideshow**/
    .cycle-slideshow {
        position: relative;
        z-index: 1;
        width: 400px; /**adjust width as required**/
        margin:75px auto;
        text-align: center;
    .cycle-slideshow img { max-width: 100% }
    /* prev / next links */
    .cycle-prev, .cycle-next {
        position: absolute;
        top: 0;
        width: 20%;
        opacity: 0;
        filter: alpha(opacity=0);
        z-index: 800;
        height: 100%;
        cursor: pointer;
    .cycle-prev {
        left: 0;
        background: url(http://malsup.github.com/images/left.png) 50% 50% no-repeat;
    .cycle-next {
        right: 0;
        background: url(http://malsup.github.com/images/right.png) 50% 50% no-repeat;
    .cycle-prev:hover, .cycle-next:hover {
        opacity: .7;
        filter: alpha(opacity=70)
    /**END SLIDESHOW STYLES**/
    </style>
    </head>
    <body>
    <h1><a href="http://jquery.malsup.com/cycle2/">JQuery Cycle2</a></h1>
    <!--begin slideshow-->
    <div class="cycle-slideshow"
        data-cycle-fx="fade"
        data-cycle-timeOut="2000"
        >
    <!-- prev/next links -->
    <div class="cycle-prev"></div>
    <div class="cycle-next"></div>
    <!--insert your images below-->
    <img src="http://jquery.malsup.com/cycle2/images/p1.jpg" alt="description">
    <img src="http://jquery.malsup.com/cycle2/images/p2.jpg" alt="description">
    <img src="http://jquery.malsup.com/cycle2/images/p3.jpg" alt="description">
    <img src="http://jquery.malsup.com/cycle2/images/p4.jpg" alt="description">
    <p>Mouse over image for previous / next links</p>
    </div>
    <!--end slideshow-->
    </body>
    </html>
    Nancy O.

  • Tooltips Not Appearing in Firefox

    I searched for answer to this problem, which I thought must be common, but didn't find anything.
    I added a tooltip using Dreamweaver CS4 insert Spry tooltip option.  The tooltip appears with Internet Explorer 8, but not Firefox 3.5.7.  The tooltip isn't blank, there's no sign of it. I tried it on two different systems running Windows 7.  I have another web page with Spry tabs that works just fine.
    Thanks for any help,
    Curt Rowe
    P.S. Here's the code
    <head>
    <script src="../SpryAssets/SpryTooltip.js" type="text/javascript"></script>
    <link href="../SpryAssets/SpryTooltip.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <span id="sprytrigger1"><img ...></span>
    <div class="tooltipContent" id="sprytooltip1">The signature is from a marriage affadavit in the Cuyahoga County Marriage Book.</div>
    <script type="text/javascript">
    <!--
    var sprytooltip1 = new Spry.Widget.Tooltip("sprytooltip1", "#sprytrigger1");
    //-->
    </script>

    GuillermoCortes wrote:
    I tried adding the title and it works fine. It's also a lot less overhead on page loads. It even looks better than the default tooltip.  Does the title appear if the image display is turned off? If so I wouldn't need it and the alt description.
    I'd still like to solve the problem in case I need to use it again. I moved the image up and it works.  Totally strange.  I tried movng the image down a few lines at a time.  The tooltip appears to stay in the same place on the page.  When the image is at it's original location, I think the tooltip is displaying so far up the page that it's not visible. I tried adding a vertical off set to bring it down, but it has no effect.
    I also noticed that the tooltip works in Dreamweaver Live View without moving it.
    I am not sure about the title appears if the image is turned off; but for XHTML compliancy the alt attribute is required.
    If you want to know more on the title attribute have a look here and you will notice that this attribute is a very much overlooked one.This attribute because it can be used on most (X)HTML tags, makes the normal use of Spry tooltips redundant.
    As far as finding a solution for the FF/Spry Tooltip problem, I think the style rules need to be tweeked. At the moment they are geared towards IE, leaving the likes of FF in the lurch.
    Whatever, I do not need Spry tooltips.
    Ben

Maybe you are looking for

  • Extract path from file using AS

    I'm trying to extract the path of a file to use it in the same script. should be like this: on open vthefile set Vpath to path of vfile --do something with vfile save new created file to Vpath Can anybody tell me the good syntax? Thanks Fist

  • BADi/User Exit in J1IEX/MIGO

    Hi., While capturing excise invoice in MIGO, iI wanna to make excise material type NONCENVATABLE as default for those items which has JMIP (Inventorized duty) in Purchase Order.If the material is maintained as Raw/asset/consumable/tools & if JMIP con

  • Cannot resize tabcontrol in edit mode

    First, I thought i had some hidden objects which circumvent to downsize the tabcontrol. But this was not the case.

  • I have a Palm Pre in Italy.

    I know this issue has come up before in these forums but it was back in 2009. We are now 2010 I have a Palm Pre and live in Italy. The phone is registered with Palm as being in Italy The phone was bought on E Bay and is from Germany I have a Canadian

  • Getting an error message when in the AppStore

    Help! When in the AppStore I keep getting the following error message: ConnectionManager::invoke:: Failed to find service connection URL What the heck does that mean? It happens when trying to purchase an app, even a free one.... And also when I try