Topic: How to modify extern.php for better website integration

I'm currently using this:

<p>
<? echo file_get_contents("http://www.mysite.fr/forum/extern.php?show=5"); ?>
</p>

To display the 5 last forum topics on my website, but I have a little problem with the output, it gives this:

http://ups.imagup.com/02/1235251041_extern.png

How can I display the last posts without the big dot at the beginning and the spaces?

I just want the topic titles to be displayed, truncated to the right length with this part of extern.php:

// The length at which topic subjects will be truncated (for HTML output)
if (!defined('FORUM_EXTERN_MAX_SUBJECT_LENGTH'))
    define('FORUM_EXTERN_MAX_SUBJECT_LENGTH', 30);

So is it possible to get

News

Test post 
Test de longueu… 
What is the now? 
dhtdjhtsj 

instead of what is on the picture above?

Thanks to anyone who can help smile

2 (edited by Yinchie 2009-02-21 18:54)

Re: How to modify extern.php for better website integration

Use CSS styling to show no dots.

list-style: none

Re: How to modify extern.php for better website integration

I removed it in the extern.php, line 258 I removed the <li> quotes:

before

echo '<li><a href="'.$item['link'].'" title="'.forum_htmlencode($item['title']).'">'.$subject_truncated.'</a></li>'."\n";

after

echo '<a href="'.$item['link'].'" title="'.forum_htmlencode($item['title']).'">'.$subject_truncated.'</a><br />'."\n";

And here is the result:

http://ups.imagup.com/02/1235264681_extern-dot-removed.png

What I don't understand is why there are some spaces before the beginning of the topic titles, so it doesn't start where it is supposed to...

Any way to fix it?

Re: How to modify extern.php for better website integration

It is because it is still in an <ul> I think!

Re: How to modify extern.php for better website integration

What should I do to remove those ugly blank spaces?

Re: How to modify extern.php for better website integration

What is your site adress so we can see the code of that section or post the code of that section here in code tags.

Re: How to modify extern.php for better website integration

Why be so difficult when you can just use CSS styling.

8

Re: How to modify extern.php for better website integration

You do't need to hack the code. the css you need is something like

ul {list-style:none !important;list-style-position: outside !important;font-size:11px;padding: 10px;margin: 0;}

Adjustments to the css should of course be made to meet your particular needs

Forum, Art, Architecture, Passion.

Have you ever visited the textpattern forum?

Re: How to modify extern.php for better website integration

Thank you for those answers smile

I feel like I really need to improve my CSS knowledge now...

10

Re: How to modify extern.php for better website integration

I removed the dot through the css but I still have those blank spaces before the topic titles and I don't understand where they come from. hmm

11 (edited by Yinchie 2009-02-23 22:25)

Re: How to modify extern.php for better website integration

Add margin: 0 and padding: 0? or margin-left and padding-left
You can style like every element of site looks with CSS.

Re: How to modify extern.php for better website integration

Since its the same question ill just add mine here.

[img]http://i45.photobucket.com/albums/f52/mofared/00003222.jpg[/img]

[b]Lecturer[/b]

Name        :    PROFESOR DR. MOHAMAD ROM BIN TAMJIS
Department    :    Department Electrical Engineering
Faculty/PTj    :    Faculty Of Engineering
Designation    :    Professor

[email]deanrom@gmail.com[/email]

[b]WHAT IS THINKING?[/b]

    Chaffee(1988)-A mental ,systematic and purposeful activity in which an individual examines his or her own thinking and other people’s thinking.

[b]Download lecture note:[/b]

[url]http://www.mediafire.com/?txgz1emiyy2[/url]

or

[url]http://rapidshare.com/files/199455153/CRITICAL_THINKING_2.ppt[/url]

When i make it to show as rss or atom it do not convert the smilies and the link. How can i fix this??

if mONey is lOSt nOThINg is lOSt,
if cHArACtER is lOSt sOMeTHiNG is lOSt,
bUT,
if rELiGIon and eDUcATiON aRE lOSt eVErYThINg is lOSt.