Do not remember me!
/ / / "Insert hidden text" message change

"Insert hidden text" message change

Hi,
When posting new article to the site I would like to hide links for unregistered user.I would like to change the text to something like "to view this content please register here" but I cannot find the file to modify.Anyone can help me with this one please.Thanks Added by: in HTML/TPL Questions on


0

Comments 5

  1. Omega
    0
    Omega Currently Offline → 2 February 2016 22:37

    I'm also looking for solution to this problem. Can anyone direct us to the right answer?

    Regards,
     N/A |  1
  2. dlefaq
    0
    dlefaq Currently Offline → 3 February 2016 00:21

    there is no option in DLE to do this, the only option available is "Automatic replace links tag [url] to tag [leech]" which is located in user group manager. however, you can use jquery to control specific area in your site, this topic will give you very good idea
    http://stackoverflow.com/questions/12663500/jquery-replace-text-inside-link

    You can replace all links in shortstory and full story area by using jquery class, for example wrap {short-story} and {full-story} with class like
    <div class="no-link">{short-story}</div>
    
    and 
    
    <div class="no-link">{full-story}</div>
    now just add this code in main.tpl before </body>
    [group=5]
    <script type="text/javascript">
    $('.no-link a').text("to view this content please register here");
    </script>
    [/group]
    you will get idea and customize your text from there...
     2 |  102
    1. readme17
      0
      readme17 Currently Offline → 4 February 2016 17:42

      Thanks for this.Will implement and let you know.
       3 |  5
    2. readme17
      0
      readme17 Currently Offline → 5 February 2016 03:45

      Hi,
      I tried it.It replaaces the link with the text but when you click on the text it sends you to the original link.
       3 |  5
  3. MongKol
    0
    MongKol Currently Offline → 5 February 2016 08:40

    in that case just replace all links with specific URL using jquery like
    <script type="text/javascript">
    $('.no-link a').text("to view this content please register here");
    $(".no-link a").attr("href", "http://www.google.com/")
    </script>
    I know it's not the way you want but at least you don't have to deal with script modifications and headache, jquery is simplest way to work around, I am sure if you do some research you will be surprise how jquery and do using "replace" string, you may also replace the whole link and url with specific string you want, but I would recommend you ask expert on stackoverflow.com, they will help you with no cost, unfortunately I am not real expert
     N/A |  37

Information

Would you like to leave your comment? Please Login to your account to leave comments. Don't have an account? You can create a free account now.