I'm having a problem with one of my news includes. This one is located in the footer of my website, and therefore can be viewed on all pages (not just the main news page). There is a huge problem that I'm running into.

When a user clicks on the news article's title from that footer, the PHP code simply adds the news article's ID # to the end of the current URL. Obviously this doesn't work unless they are on the main news page.

Does anyone know a way to fix this, or work around it?



Currently I'm having the title pull up a separate box, but I need it to link to the page that contains that article.

Also, I've noticed that the include is not pulling the news template correctly. I have a separate template just for the news located in the footer of the website (called footer). It pulls the colors for the links and that it should only show 1 news article at a time.. but for some reason it's not pulling the body text; making it near impossible to read. Any ideas on that?

You can view the situation at the bottom of the page here: www.rfcomply.com

Sorry for the late response to this. THANK YOU SO MUCH!!

I'm sure I looked through the core.php file a million times and never found those lines. (doesn't help when I don't know much of anything of php)

The articles are now finally showing the correct dates. The only goal now is to figure out how to get a link to show the archives.

I was having a lot of problems with the pagination as well. Eventually I just had to copy/paste every file from GitHub into the files that I had on my end. Then do the migration.

It's a bit of a hassle.. but it did fix the missing pagination, as well as some other issues I had.

I tired using the code you provided:

[url=#]Go Back[/url]

Unfortunately this didn't work for me at all. It was just remaining on the same page and not going back.

While looking it over, I decided that my best bet, was just to place a link to the actual location of the main news at the bottom of the full news template. It will just take the person back to the first page of the news, and not back to whatever page they might have been on... but it's a temporary fix for now.

I'm still curious as to why I can't get this to work correctly though.

It is a really strange bug. It wasn't there before updating, but is now.

I've also noticed one other thing. When copy/pasting old news files over from N13News, for some reason the Ckeditor is adding in tons of non-breaking spaces ( ). From what I can see, it's adding the   in between every single word in the post.

To make sure that it wasn't the original code in the posts, I copied and pasted into dreamweaver (DW) to check. The original HTML is perfectly clean and minimal. Nothing more than <p></p> and links. Some
. So it must be something with Ckeditor adding in the junk code.

Normally I'd probably just ignore it, but thanks to the extra code, it's forcing both short and long news to break from their div tags. Not good.

So far the only "fix" I could find was to have both news open at once, copy straight from the ckeditor source view from one, into the ckeditor source view of the other and not hit "post" or "edit" until I was finished. Then I can't go back to edit it again, or it would toss in the junk code.

Is this something that is even possible to do?

I'd really like to extend the year to 2001 if possible. A lot of our news articles are from 2001 and 2002, and I'm not sure my bosses would be happy with them saying 2003.


Is there somewhere in the code where you can set the limit for how far back the years go for posts? If so, where is it located?

Went through and updated every file via github, then ran the script for the migration. Everything is working now.

For anyone interested, the updates and migration fixed the following issues that I was having:


- HTML links we being stripped from news (anything using <a></a>)
- Long articles were getting stripped down to nothing.
- Pagination disappeared from main news, and other pages were losing CSS from main site.
- installation of CkFinder now works, CkEditor no longer loses it's toolbars.


I am still having a little bit of trouble with creating a "back" button in the full news. The problem comes from after a person hits "back" to return to the main news page you then lose abillity to click any links.

I have tried the following bits of code to create the "back button" within the full news, and all with the same results. They work, but with loss of link functionality.

[url=java script:history.go(-1)]Return to Latest Press[/url]

<Form><input value="Return to Latest Press" onClick="history.go(-1);return true;"> </form>

<button onclick="history.go(-1);"> Return to Latest Press </button>

For this I made sure that the script was located in the main news.php file:

<script>
function goBack()
  {
  window.history.back()
  }
</script>

<body>
<button onclick="goBack()">Go Back</button>
</body>

Not sure why it's losing the ability to click on links after you hit "back". Refreshing does fix it, but that's not an idea solution.

Anyone have any ideas?

Thanks! I didn't realize there was an additional thing I had to do. I thought that so long as I copied in the original files for the posts, that it would be fine.

I'll work on it today and see what happens. I realized also, over the weekend, that I didn't copy over every file from github. Just the files that changed earlier than 3 months ago. I'll go through and update each one to make sure I didn't miss anything before the migration.

Did you update CuteNews with the latest GitHub version?

IIRC there was a problem with HTML vanishing and it had been resolved in one of the GitHub updates.


I actually did go through and backup all files and then update using what is on github. The links are now working correctly, as is the random bug where long news posts would be cut and stripped when posting. But now my pagination is destroyed. I'm no longer getting the prev/next links and if I view and article and use the "back" link that I placed using a bit of code given by another member:

<div>
[url=java script:history.back(1)]Return to Latest News[/url]
</div>

This bit used to work just fine before I implemented the updates. Now it really messes with the pages. I now lose all CSS from the main page, and regain the pagination, but they don't link to the next pages like they should.

10

(20 replies, posted in Problem Solving / Help & Support)

HTML links are being stripped from both short and full news. CKeditor toolbar button for adding links creates standard HTML tags <a></a> which are then later stripped when posting or editing.

So far only BBcode works for links, but are unable to open links in new tabs/windows.

I've noticed that when using the CKeditor, any links done with HTML tags <a></a> are stripped from the short and full news once posted.

Tweaking around with it, I did notice that the links WILL post if done using BBcode [link][/link].

The problem from there is that you cannot open the links in new tabs (or windows) using the standard "_blank".


I have HTML enabled for the CKeditor and all other tags that I've used so far seem to work correctly. But if I use the built-in "Link" function located in the toolbar, the links are given the standard HTML tags and are then stripped.

Other people have had this problem as well, but I can't find any solutions in the forums. Does anyone know what the problem could be?

I have a lot of old articles to add (that will archive later) and need to know if we can change the years to extend to 2001 or later?

... Well I think I just answered my own question.

I placed the first two bits of code into the head of my footer page and tried it out. It now works exactly as it should.

I hope that helps anyone else who might have had the same problem!

I suppose to help put into perspective what I'm needing to do... This is what I have set up currently for the main news page.

The code located at the top of the page (above HTML):

<?php

    require_once("core/init.php");

    // Play with settings --------------------------------------------------
    $pw = REQ('pw');

    if ($pw['PHP_SELF']) $PHP_SELF = $pw['PHP_SELF'];
    if ($pw['template']) $template = $pw['template'];

    if ($pw['start_from']) $start_from = $pw['start_from'];
    if ($pw['number']) $number = $pw['number'];
    if ($pw['archive']) $archive = $pw['archive'];
    if ($pw['category']) $category = $pw['category'];
    if ($pw['ucat']) $ucat = $pw['ucat'];
    if ($pw['sortby']) $sortby = $pw['sortby'];
    if ($pw['dir']) $dir = $pw['dir'];
    if ($pw['page_alias']) $page_alias = $pw['page_alias'];
    if ($pw['tag']) $page_alias = $pw['tag'];
    if ($pw['user_by']) $user_by = $pw['user_by'];

    if ($pw['static']) $static = $pw['static'];
    if ($pw['reverse']) $reverse = $pw['reverse'];
    if ($pw['only_active']) $only_active = $pw['only_active'];
    if ($pw['no_prev']) $no_prev = $pw['no_prev'];
    if ($pw['no_next']) $no_next = $pw['no_next'];
    // ---------------------------------------------------------------------

    if ($_GET['do'] == "rss") include("rss.php");
?>

The script located inside of the HEAD:

<script type="text/javascript" src="../pc/js/jqueryslidemenu.js"></script>
<script>
        window.onload=function()
        {
            var edt_comm_mode=document.getElementById('edt_comm_mode');
            if(edt_comm_mode!=null)
            {
                window.scrollTo(0,9999);
            }
        }
</script>

The code located inside the body of the page:

<?php
                
                /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Here we decide what page to include
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
                if ($_GET['search'])
                {
                    include ("search.php");
                }
                elseif ($_GET['do'] == 'archives')
                {
                    include ("show_archives.php");
                }
                elseif ($_GET['do'] == "stats")
                {
                    echo "You can download the stats addon and include it here to show how many news, comments ... you have"; // include("../pc/$path/stats.php");
                }
                else
                {
                    include ("show_news.php");
                }

                ?>


That's the primary news feed. Now at the footer of all pages is an additional include for my footer. Within the footer is the code for the secondary feed. This should only contain the first article (the newest one posted), and will use a different template from CuteNews.

Here is what I have inside of the footer:

<?php

    $number = 1;
    $template = "footer";
    $static = TRUE;
    include("/home/rfcomply/public_html/cutenews/show_news.php");

?>


The problem that I'm running into, is that when I add in the include for the footer. The script suddenly starts to mass duplicate itself. In the end freezing the page. It also shows the same number of articles as the default template (5) instead of the 1 that I set.

The first two bits of code are not included in the footer page. But since this is set as an include for the main news page, will it read the script at the start when the page loads? Or will I have to include the script into the footer page as well??

Does anyone know how I can fix this??

I am migrating over to CuteNews from FusionNews, now that it is no longer being updated or supported. One of my absolute favorite features from FN is that I could do a PHP Include of the news into multiple sections of the same HTML page (obviously ending in .PHP and not .html).

This was great as I use a php include for my website footer and inside of that like to have a small "latest press" box that contains only the latest article. Then when they navigate to the main press page, they find the rest of the news and articles.


Is this something that I can also do with CuteNews?

I'm wondering if there is a way to get the news pagination to show up at the top of the news feed as well as the bottom? Right now it shows up at the bottom and works just fine. But is there a way to also have it show at the top at the same time?

Has anyone made any progress on this?

Also having this problem. A fix would be greatly appreciated, as I'm trying to implement CN into the website of the company I work for. (and they are really big on huge news articles full of links)

Hello, I'm new to CN and just downloaded and got everything running last week.

So far everything is working great for me, except for one major issue. Whenever I insert a link into either short or long news, the link vanishes when I save.

Does anyone else have this problem? I'm pretty much screwed if I can't get links to work in my posts.