26 (edited by pgregg 2004-07-11 10:31)

Re: Blogs anyone?

Paul and Cuteseal,

Thanks for the pointers.

Paul - I couldn't find a Reply Only forum mod - only a general Admin Options to prevent guests/users from starting topics - which has the same effect on an install wide basis.

cuteseal - very nice. I presume you wrote this?  If so, congrats.

I had a few issues with it though - by default, I was getting each topic in the correct (reverse) order, however I was getting the last comment instead of the first post in the thread (if I had followed up to a comment).  I solved this by adding a ORDER BY posted in your query on line 266.

Next, line 269 is missing a comment 'Display first paragraph only'

I also wanted to display more than the arbitrary first paragraph, so I changed your preg_split to an explode on 3 new lines (i.e. posts have 2 blank lines between 'summary' and 'body'):

        #Display first paragraph only (comment out next four lines to turn off)
        #$paragraph = preg_split("/\s*\n+/", $cur_post['message']);
        $cur_post['message'] = str_replace("\r", '', $cur_post['message']); // get rid of any CR in a \r\n style newline
        $paragraph = explode("\n\n\n", $cur_post['message']);
        if (isset($paragraph[1])) {


You can see my first working draft at http://www.pgregg.com

Thanks, I'll prob tweak it more...

Oh, and I didn't want to call it via http:// as that makes an extra hit in the logs, so I ran it by:

$_GET['action']='new';
$_GET['show']=10;
$_GET['fid']=1;

ob_start();
chdir($_SERVER['DOCUMENT_ROOT'] . '/forums');
include("forums/externnews.php");
$blog = ob_get_contents();
ob_end_clean();

$blog = str_replace('img/smilies', 'forums/img/smilies', $blog);

print '<br>'.$blog;

And removed all the calls to exit; in your code (which I think are redundant with the if/else structure you have used).

Again, thanks.

Cheers

27

Re: Blogs anyone?

For Cuteseal's reply only forum mod see here
http://punbb.org/forums/viewtopic.php?id=4036

Re: Blogs anyone?

I have a few blogs... one on greatestjournal, one on blogspot, and one hosted on my own server.... I dont really use them because I'm too lazy tongue

29

Re: Blogs anyone?

pgregg, thanks

I waz looking for a way to make the link of the smilies from img/smilies to forum/img/smilies.

For those of you who don't know yet, in the externnews find

$cur_post['message'] = parse_message($cur_post['message'], $cur_post['smilies']);

and modify it into this

$mesaj = str_replace('img/smilies', 'forum/img/smilies', $cur_post['message']);

now just add insted of

<div>".$cur_post['message']."</div>

this

<div>$mesaj</div>

30

Re: Blogs anyone?

Sorry i made a mystake in the first post, this must work smile

pgregg, thanks

I waz looking for a way to make the link of the smilies from img/smilies to forum/img/smilies.

For those of you who don't know yet, in the externnews find

$cur_post['message'] = parse_message($cur_post['message'], $cur_post['smilies']);

and modify it into this

$cur_post['message'] = parse_message($cur_post['message'], $cur_post['smilies']);
$mesaj = str_replace('img/smilies', 'forum/img/smilies', $cur_post['message']);

now just add insted of

<div>".$cur_post['message']."</div>


this

<div>$mesaj</div>

31

Re: Blogs anyone?

Could someone explain to me... what do you need a blog for? Its just a simple page where you can post small texts containing anything you like or what?

Then hope for someone to find them interesting enough to read... smile

If that´s the case, then i actually have setup something similar on my page, without even knowing it =P I´ve got an admin system allowing me to create pages with different kinds of content, it also allows me to create "underpages" to the ones im doing... check here:
www.erikhome.info ... In the menu to the left right under the picture you have 2 links at the top.. one saying "mörk materia" and one sayng "jag".. both created with the system... (sorry my page is in swedish smile)

The "underpages" function is displayed if you check "mörk materie". You will find a new little menu appearing on top of the content containing related pages...

Most people are other people. Their thoughts are someone else's opinions, their lives a mimicry, their passions a quotation - Oscar Wilde

Re: Blogs anyone?

bobitt wrote:

Could someone explain to me... what do you need a blog for? Its just a simple page where you can post small texts containing anything you like or what?

Yes. It's the new version of the diary :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

33

Re: Blogs anyone?

hehe cyberdiary.. without the locks on it.. EXCELLENT! big_smile

Most people are other people. Their thoughts are someone else's opinions, their lives a mimicry, their passions a quotation - Oscar Wilde

Re: Blogs anyone?

And a good place to save those peasky websites you find all over the place and want to remember at a later date wink

35

Re: Blogs anyone?

Ive made a blog for my page now.. self coded and not quite finished yet... but still.. check the "blog" link on the left menu below the image:
www.erikhome.info

Most people are other people. Their thoughts are someone else's opinions, their lives a mimicry, their passions a quotation - Oscar Wilde

36

Re: Blogs anyone?

ive tried to have a blog lots of times, but i always forget to write.. and they die like a week later tongue.. so i use forums instead big_smile

Re: Blogs anyone?

Here we go again! big_smile

http://rickard.punbb.org/

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Blogs anyone?

Cool, that 'Your browser sucks' thing in IE! Can I copy it? :-)

But the mod_rewrite thing doesn't seem to work. I keep getting 404 errors.

39

Re: Blogs anyone?

Glad to see that you're using the new WordPress release for your latest blogging foray, Rickard. I think you'll find out over time just how well-designed it is.

I tried to add your blog to my feed reader, but as Sander pointed out, it seems your rewrite rules are not active. Perhaps you need to restart your web server?

Re: Blogs anyone?

I'm aware of the mod_rewrite thing. Should be fixed soon.

Sander D: Get Firefox ribbon.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

41

Re: Blogs anyone?

A blog, now we can spam you smile

Nice adaptation of the Kubrick design.

Thanks for the link, need to add a Blogroll to my site.

42

Re: Blogs anyone?

My browser may suck but so does Firefox. Stuff the internet, read a book.

Re: Blogs anyone?

Rickard wrote:

Sander D: Get Firefox ribbon.

Awesome big_smile
Added to my game.

Indocron
$theQuestion = (2*b) || !(2*b);

Re: Blogs anyone?

Paul wrote:

My browser may suck but so does Firefox. Stuff the internet, read a book.

That's no fun smile

"Programming is like sex: one mistake and you have to support it for the rest of your life."

45

Re: Blogs anyone?

He must mean the Book of Mozilla. That's a good book.

Re: Blogs anyone?

graue wrote:

He must mean the Book of Mozilla. That's a good book.

And it's easy to access...
Amen to "about:mozilla"! Down with Mammon...Which, incidentally, is in the new Constantine movie.
*hmmmm*

Anyways, installed the ribbon on my own boring blog about nothing:
http://www.zanthria.com

The only integration with punBB that I use is the display of forum stats on the front.

Long live WordPress!

Re: Blogs anyone?

BTW, I finally fixed the mod_rewrite problems in my blog. It was, of course, my fault smile

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Blogs anyone?

What happened to you blog, it looks like it is down - and not even a word of goodbye to all your long time readers :-)

Re: Blogs anyone?

Haha smile

It's not down, just a bit inactive.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Blogs anyone?

Rickard wrote:

It's not down, just a bit inactive.

Exactly what I told my girlfriend last night :-)

On a more serious note, I get the the PunBB site when visiting rickard.punbb.org, is that intentional?