Author Topic: Can I place (include) headlines somewhere in my news.html  (Read 2913 times)

0 Members and 1 Guest are viewing this topic.

Offline freeflight

  • Newbie
  • *
  • Posts: 2
Can I place (include) headlines somewhere in my news.html
« on: March 27, 2007, 02:29:01 PM »
Can I place (include) headlines somewhere in my news.html.
In other words is it possible to create news page with this script where you have headlines in the e.g. left table (or frame)
and news article of chosen headline in the main area of the  page so that all news content can work in a single page?
I have tried to include it with perl and PHP but of no avail.
I can write headline code in my news page but then i get headline of the current page article only and I must go back to the main page with headlines.

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Can I place (include) headlines somewhere in my news.html
« Reply #1 on: March 28, 2007, 05:22:19 AM »
Maybe you can use an iframe in your news.html?

Offline freeflight

  • Newbie
  • *
  • Posts: 2
Re: Can I place (include) headlines somewhere in my news.html
« Reply #2 on: March 28, 2007, 08:18:26 AM »
That's what i've tried too, but my problem is targeting.It opens in the same frame everytime no matter what value i use.

Offline Jason

  • Administrator
  • Hero Member
  • *****
  • Posts: 1018
    • slipdex
Re: Can I place (include) headlines somewhere in my news.html
« Reply #3 on: March 28, 2007, 08:46:39 AM »
This kinda sucks to do it this way, but use a two-frame method.  If you can't get the news items to appear using an SSI the display them in a frame, then create another "news" frame and target the link to the news frame.

I don't play much with the news script cuz I don't have it, but seems that it should work out that way.

Jason
Founder of www.slipdex.com

Offline jackferguson

  • Newbie
  • *
  • Posts: 11
Re: Can I place (include) headlines somewhere in my news.html
« Reply #4 on: May 10, 2014, 04:42:24 AM »
Hi Jason, what do you mean by a two-frame method? Here is what I am trying to achieve..

In the article page, I want to display 3 related headlines/stories. Now, I am able to do this no problem on a seperate page using an include/.shtml method. However, it seems I cannot use the same method in the article page? Do you have any ideas, how this could be achieved? So basically I just want to display related headlines in the article page. If not possible with news script, maybe it is possible with csv scripts? but then I would lose the Headlines > Article structure i.e. im not sure if its possible to replicate the news script features in the csv script by having a list of headlines and then 'read more' linking to an article page?

Thanks in advance

Offline Jason

  • Administrator
  • Hero Member
  • *****
  • Posts: 1018
    • slipdex
Re: Can I place (include) headlines somewhere in my news.html
« Reply #5 on: May 12, 2014, 04:33:08 AM »
Hi Jack,

It's been a long time since I viewed anything on the newscript. I truly do not use the newscript at all. The two frame method would place iframes on the page where one displays the article content, and one displays an article list. The target in the articles list would point to the display iframe.

Like I said, I don't use the newscript. I use the CSV scripts for everything because of the amount of control you have with them. Sorry I can't explain better.

Jason
Founder of www.slipdex.com

Offline jackferguson

  • Newbie
  • *
  • Posts: 11
Re: Can I place (include) headlines somewhere in my news.html
« Reply #6 on: May 12, 2014, 01:25:51 PM »
Thanks for your response Jason. I will have a look at the iframe solution. Does that mean my actual article page would be 2 i frames only without the 'news' template tag?

However, for a more optimal solution i wonder if i can achieve something similar with csv script extra? I have them too but ive never found a way to replicate the headlines - article, 2 level structure. It seems simple given the control you get with csv scripts but ive never fathomed how. Could you point me in the right direction on how to achieve this?

Much appreciated.

Jack

Offline Jason

  • Administrator
  • Hero Member
  • *****
  • Posts: 1018
    • slipdex
Re: Can I place (include) headlines somewhere in my news.html
« Reply #7 on: May 12, 2014, 06:33:06 PM »
Hi Jack,

It has been so long since I've tried anything with the newscript that I actually went on the website to look at the demos! ;D I do something very similar to the newscript using the csv scripts. I make my own admin site and add articles to a clients websites. You can check out:

http://www.evanslifedesigncoaching.com/c/art/
http://www.mdouglasevanstherapy.com/cgi-bin/art.pl

Both of those use the csvread scripts to display. I use the csvwrite script to add them in an admin panel I created (easier than using the csvedit script). I even ad a PDF version of the articles on the therapy site, so a user can download a printable version. I use javascript to do the show/hide of the preview which you can grab from me here: http://www.slipdex.com/js/collapse.js. Then I also use a little javascript magic to show a truncated amount of the article:

Code: [Select]
<script>
var content = "[[field with news story]]";
var n = content.slice(0,300); //first 300 characters
document.write(n + "...<a href=linklocation>Read More >></a>");
</script>

I can do things with the scripts easier than I can explain them unfortunately. Hopefully you can reverse engineer what I did on those sites to get what you need.

Jason
« Last Edit: May 12, 2014, 06:35:47 PM by Jason »
Founder of www.slipdex.com

Offline jackferguson

  • Newbie
  • *
  • Posts: 11
Re: Can I place (include) headlines somewhere in my news.html
« Reply #8 on: May 18, 2014, 04:00:30 AM »
thanks Jason, i managed to re-create the news headlines >article structure with the csv scripts and consequently i could use extra templates to also create the desired related headlines on the article page. now to create an admin panel - so you recommend creating one using csvread and csvupdate scripts rather than editing the csvedit script directly?

Offline Jason

  • Administrator
  • Hero Member
  • *****
  • Posts: 1018
    • slipdex
Re: Can I place (include) headlines somewhere in my news.html
« Reply #9 on: May 18, 2014, 06:46:25 PM »
Hi Jack,

This is what I do...

I use a simple form (nothing fancy since it is just me) and csvwrite to create the initial article entries. In the form, where I am putting the article I use a WYSIWYG editor embedded in my code called openWYSIWYG. Here is a ZIP file for you! http://www.yourwebsitesupport.com/wysiwyg.zip. I use that so I can format bullets, colors, bold, etc easier rather than html coding it by hand. As a tip, remember to allow html in the csvwrite script.

Updating I actually usually just use the csvedit script if it is just me editing it, but since I allow my clients to edit their own articles and other content, I use csvread to populate the very same form I used to create the article. It is just a separate instance of the page with the template tags and this time I have the database fields fill in the data for editing. A nice feature of the openWYSIWYG library is that it will populate with all the formatting intact, unlike the raw code in csvedit. In case you need help on this here is the post. http://www.ezscriptingforums.com/index.php?topic=290.msg2156#msg2156

Like I said before, I'm much better at doing with these scripts than I am teaching, but I have literally not found anything I CAN'T do with these. I hope that helps.

Good Luck!
Jason



Founder of www.slipdex.com