[ABD] News Mod

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
paulbunker
Registered User
Posts: 27
Joined: Tue Nov 27, 2007 5:41 pm
Location: Chester, England
Contact:

Re: [RC] News Mod

Post by paulbunker » Mon Jun 16, 2008 1:24 am

Nitroid wrote:
paulbunker wrote:yes there is a comment's link
No, that's not what I'm asking--

I know there's a link to the comments, but is there any way to display the amount of comments posted on the news page?
yes indeed it does click the link in my sig to see it in opperation.


anyone found a way to display bbcodes propperly? i'm sure there must be a way to use the code from phpbb??

i've found some usefull links

http://www.phpbb.com/community/viewtopi ... a&start=60
http://olympuswiki.naderman.de/Parsing_text

it's all a little beyond me i'm just a bassist.

-Px

dem_
Registered User
Posts: 17
Joined: Tue Apr 08, 2008 9:11 pm

Re: [RC] News Mod

Post by dem_ » Mon Jun 16, 2008 9:38 pm

Great mod just what i was looking for, a way to add multiple categories topics to an external web page, looking forward for the final release (Y)

imperialxt
Registered User
Posts: 27
Joined: Thu Jun 12, 2008 4:09 pm

Re: [RC] News Mod

Post by imperialxt » Tue Jun 17, 2008 6:01 pm

nvm mind bout my issue i found the problem table prefix was wrong.

I do however have a question:

On my site it isn't massive etc but the size of my news posts vary in size and as such and i've noticed that sometimes the posts extend of my page so instead of having a set amount of posts that show or having to edit the amount of posts that show on the page each time i was wondering if there is a way i can make it so it will either squeeze as many as it can then not go any further after that or so that it auto detects somehow i dont know how though that it cant fit anymore or something?

ecwpa
Registered User
Posts: 107
Joined: Thu Sep 25, 2003 2:13 am
Contact:

Re: [RC] News Mod

Post by ecwpa » Thu Jun 19, 2008 12:00 am

Nitroid wrote:
paulbunker wrote:yes there is a comment's link
No, that's not what I'm asking--

I know there's a link to the comments, but is there any way to display the amount of comments posted on the news page?
this is how i did it:

find

Code: Select all

//Query the database for the username from the user id
before add

Code: Select all

              // How many replies we have?
              $replies_query = "SELECT (sum(post_postcount)-1) as replies FROM " . $table_prefix . "posts WHERE topic_id='" . $row['topic_id'] . "';";
              $replies_result = mysql_query($replies_query);
              $replies_row = mysql_fetch_object($replies_result);
			  $replies =  $replies_row->replies;
find

Code: Select all

//get variables ready for template
before add

Code: Select all

				  // my humble additions
                  $replylink = "<a href=\"/" . $forumpath . "/posting.php?mode=reply&f=" . $current_forum . "&t=" . $current_topic . "\">Responder</a>";
				  
				  $replyURL = "/" . $forumpath . "/posting.php?mode=reply&f=" . $current_forum . "&t=" . $current_topic;
				  $viewURL = "/" . $forumpath . "/viewtopic.php?f=" . $current_forum . "&t=" . $current_topic;
                  
				  $viewlink = "<a href=\"/" . $forumpath . "/viewtopic.php?f=" . $current_forum . "&t=" . $current_topic . "\">Respuestas/Comentarios</a>";
                 
				 // Comments
				 
				 // more than 1
				 if ($replies > 1)
				     $replies_link = "<a href=" . $viewURL . "> " . $replies . " Comments</a>";

				 // 0 comments 
				 else if ($replies < 1)
				 $replies_link = "<a href=" . $replyURL . ">Be the first to comment!";
				
				// 1 comment
				 else
				 $replies_link = "<a href=" . $viewURL . "> " . $replies . " Comment</a>";

find

Code: Select all

$template = str_replace("{message}", $message, $template);
add after

Code: Select all

                    $template = str_replace("{replylink}", $replylink, $template);
					$template = str_replace("{reply_URL}", $replyURL, $template);
                    $template = str_replace("{viewlink}", $viewlink, $template);
					$template = str_replace("{topic_replies}", $replies_link, $template);
now you can use these variables in your template

this is what i added:

Code: Select all

<h4><div>{postdate} | {topic_replies} &nbsp; <a href="{reply_URL}"><img src="style/images/commentss.gif" border="0" alt="Comment"></a></div></h4>
ps. maybe i forget to mention something


now, if someone please can find a solution to the bbcode parse stuff, i really tried to do it with eregi_replace and preg_replace functions but they are really confusing, not to mention the bizzar.ssi logic

by the way, i thing this

Code: Select all

$message = str_replace("]", "\">", $message);
could be a problem
carefull, not english speaker native here

fwc
Registered User
Posts: 64
Joined: Mon Mar 24, 2008 8:59 am

Re: [RC] News Mod

Post by fwc » Thu Jun 19, 2008 4:03 am

Does someone have a demo or screen shot of the mod? The n-etwork.com isn't working :(

cruddpuppet
Registered User
Posts: 57
Joined: Mon Jan 02, 2006 5:34 am

Re: [RC] News Mod

Post by cruddpuppet » Sun Jun 22, 2008 6:19 pm

Thanks to ecwpa, the reply count works. ^^

It's been added to the script, and is ready to download.

Also, good news as well, bb code is now parsed on its own! Meaning, no need for any regex or str_replace's! (Or at least, on our part, anyways.)

Demo:
http://uranet.net/mod.php

ecwpa
Registered User
Posts: 107
Joined: Thu Sep 25, 2003 2:13 am
Contact:

Re: [RC] News Mod

Post by ecwpa » Mon Jun 23, 2008 1:40 pm

OH MY GOD!

amazing, that's what i was waiting for, i'm going to post the links to my site

thanks cruddpuppet
carefull, not english speaker native here

cruddpuppet
Registered User
Posts: 57
Joined: Mon Jan 02, 2006 5:34 am

Re: [RC] News Mod

Post by cruddpuppet » Mon Jun 23, 2008 5:13 pm

No problem, I'm glad you like the script. ^^

jorge89
Registered User
Posts: 7
Joined: Thu Mar 01, 2007 10:49 pm
Contact:

Re: [RC] News Mod

Post by jorge89 » Tue Jun 24, 2008 10:00 pm

Hello, wanted to ask two things. I am using the "PHPBB3 News Mod v.3.0."

1. I get an error when the user is not logged.

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/session.php on line 916: Cannot modify header information - headers already sent by (output started at C:/wamp/www/2pacmakaveli/portada2.php:7)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 916: Cannot modify header information - headers already sent by (output started at C:/wamp/www/2pacmakaveli/portada2.php:7)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 916: Cannot modify header information - headers already sent by (output started at C:/wamp/www/2pacmakaveli/portada2.php:7)
??

2. How could put all the news and sort them with numbers, like this: // << Previous & Next >>

Image

??


Pd: Sorry for my English of google, I am Spanish

cruddpuppet
Registered User
Posts: 57
Joined: Mon Jan 02, 2006 5:34 am

Re: [RC] News Mod

Post by cruddpuppet » Wed Jun 25, 2008 2:55 pm

Oh, I am so sorry about the error! >_<

Go to the first line of mod.php, and remove the first few spaces.

Code: Select all

    <?PHP
Turn the above code into the below code:

Code: Select all

<?PHP

jorge89
Registered User
Posts: 7
Joined: Thu Mar 01, 2007 10:49 pm
Contact:

Re: [RC] News Mod

Post by jorge89 » Wed Jun 25, 2008 4:28 pm

OK, thanks. He changed the "mod.php" And I have removed spaces the only problem is when I "include" I usually give the same problem.

Page: http://www.2pacmakaveli.es/portada2.php
Mod.php: http://www.2pacmakaveli.es/mod.php

cruddpuppet
Registered User
Posts: 57
Joined: Mon Jan 02, 2006 5:34 am

Re: [RC] News Mod

Post by cruddpuppet » Wed Jun 25, 2008 5:19 pm

Is there anything before <?PHP in your mod.php? That might cause the error.

jorge89
Registered User
Posts: 7
Joined: Thu Mar 01, 2007 10:49 pm
Contact:

Re: [RC] News Mod

Post by jorge89 » Sat Jun 28, 2008 9:39 pm

Hello, you can do to this "Mod" a paging system???

Saludos

User avatar
DoctorWombat
Registered User
Posts: 21
Joined: Mon Mar 26, 2007 9:23 pm
Location: Vancouver, Canada
Contact:

Re: [RC] News Mod

Post by DoctorWombat » Sat Jun 28, 2008 11:23 pm

Hi, I wanted to say, I'm very satisfied with this mod. : ) It's working perfectly, and I updated it recently to reflect the post-count mod and everything, too.

(You can check it out here if you want.)

I'm wondering if you have any plants to integrate inline attachments into this mod? At the moment if you try to, say, attach a picture to the news post and then use it inline, it messes up.

Personally for me it's not a big deal, it's just more of a convenience. Thanks. =D

Granz
Registered User
Posts: 12
Joined: Mon Oct 10, 2005 12:48 pm

Re: [RC] News Mod

Post by Granz » Mon Jun 30, 2008 5:29 pm

Zip is corrupted can someone post one that can be unzipped?

Locked

Return to “[3.0.x] Abandoned MODs”