easyPortal

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10406
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: easyPortal

Post by Noxwizard »

SuperUnknown wrote:Is it possible to display "news" on the portal page with the image ? (taken from the first attachment)
Something like in this example: http://www.samanyolufanlari.com/index.php
But I'm using a subsilver based style.

thx :)
The easiest would be to just add the image to the post. I don't really have time to look into such a modification.


deauvilleuk wrote:Hi there..excellent MOD 8-)

Don't know if this has been asked before :oops:

..how can I add the birthdays feature to appear in the Who's Online area below 'Complete List' ?

Thanks

Graham
I just snagged this out index.php, but it will serve your need:

Code: Select all

// Generate birthday list if required ...
$birthday_list = '';
if ($config['load_birthdays'] && $config['allow_birthdays'])
{
    $now = getdate(time() + $user->timezone + $user->dst - date('Z'));
    $sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday
        FROM ' . USERS_TABLE . ' u
        LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid)
        WHERE (b.ban_id IS NULL
            OR b.ban_exclude = 1)
            AND u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
            AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
    $result = $db->sql_query($sql);

    while ($row = $db->sql_fetchrow($result))
    {
        $birthday_list .= (($birthday_list != '') ? ', ' : '') . get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);

        if ($age = (int) substr($row['user_birthday'], -4))
        {
            $birthday_list .= ' (' . ($now['year'] - $age) . ')';
        }
    }
    $db->sql_freeresult($result);
}

$template->assign_vars(array(
    'BIRTHDAY_LIST'    => $birthday_list,
));
} 
Then just put {BIRTHDAY_LIST} in portal_body.html.


ricker33 wrote:Found out the [img] problem in the block. Now just wondering about the having 2 polls from same forum section?

Thanks
That would be similar to the answer I gave for #2 here: http://www.phpbb.com/community/viewtopi ... #p10814045
Duplicate the code, hard code the forum id, rename the block var, duplicate the HTML block and update the loop name.
You're also going to have to change part of the poll function.
In /includes/functions_portal.php, change:

Code: Select all

function fetch_poll($forum_id_ary, &$votes)
to

Code: Select all

function fetch_poll($forum_id_ary, &$votes, $offset = 0)
and (a bit farther down)

Code: Select all

$result = $db->sql_query_limit($sql, 1);
to

Code: Select all

$result = $db->sql_query_limit($sql, 1, $offset);
I haven't tested that, but it should work.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
SuperUnknown
Registered User
Posts: 16
Joined: Wed Oct 21, 2009 11:18 am

Re: easyPortal

Post by SuperUnknown »

Noxwizard wrote:
SuperUnknown wrote:Is it possible to display "news" on the portal page with the image ? (taken from the first attachment)
Something like in this example: http://www.samanyolufanlari.com/index.php
But I'm using a subsilver based style.

thx :)
The easiest would be to just add the image to the post. I don't really have time to look into such a modification.

I repeated partial (whole?) code for this functionality:

portal.php

Code: Select all

			// Portal Attachment image by Crack
			if ( defined('ATTACHMENTS_ON') && $fetchposts[$i]['post_attachment'] )
			{
				$attachments = get_attachments_from_post($fetchposts[$i]['post_id']);
				foreach( $attachments as $attachment )
				{
					if( strpos($attachment['mimetype'], 'image') !== false )
					{
						if( intval($attach_config['allow_ftp_upload']) && !$attachment['thumbnail'] )
						{
							if( trim($attach_config['download_path']) == '' )
							{
								message_die(GENERAL_ERROR, 'Physical Download not possible with the current Attachment Setting');
							}
							$img_path = trim($attach_config['download_path']) . '/' . $attachment['physical_filename'];
						}
						else
						{
							$server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://';
							$server_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['server_name']));
							$server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : '';
							$script_name = preg_replace('/^\/?(.*?)\/?$/', '/\1', trim($board_config['script_path']));
							if ($script_name[strlen($script_name)] != '/')
							{
								$script_name .= '/';
							}
							$image_path = $server_protocol . $server_name . $server_port . $script_name . $upload_dir . '/' 
								. ( $attachment['thumbnail'] ? 'thumbs/t_' : '')
								. $attachment['physical_filename'];
						}
						$img_size = array(200, 0); // szerokość, wysokość
						if( $attachment['comment'] && preg_match('#(\d+)x(\d+)#', $attachment['comment'], $match) )
						{
							$img_size = array(intval($match[1]), intval($match[2]));
						}
						$img_size = ( $img_size[0] ? 'width="' . $img_size[0] . '" ' : '' )
							. ( $img_size[1] ? 'heigh="' . $img_size[1] . '" ' : '' );
						$image = '<img ' . $img_size . 'src="' . $image_path
							. '" alt="' . htmlspecialchars($attachment['comment'])
							. '" style="border:0px" />';
						if( $attachment['thumbnail'] )
						{
							$image = '<a href="'. append_sid("download.$phpEx?id=".$attachment['attach_id'])
								. '" target="_blank">' . $image . '</a>';
						}
						$template->assign_block_vars('fetchpost_row.image', array(
							'IMAGE' => $image,
							'COMMENT' => htmlspecialchars($attachment['comment']) )
						);
						break;
					}
				}
			} // Attachment image end

portal_body.tpl

Code: Select all

         {BEGIN_NEWS}
         <table width="99%" cellspacing="1" cellpadding="1" border="0" align="center">
               <tr>
               <td>
                  {NEWS_HEADER}
                  <!-- BEGIN fetchpost_row -->
                  <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
                     <tr>
                        <td class="catHead" height="25"><span class="genmed"><b>{fetchpost_row.TITLE}</b></span></td>
                     </tr>
                     <tr>
                        <td class="row2" align="left" height="24"><span class="gensmall">{L_POSTED}: <b>{fetchpost_row.POSTER}</b> @ {fetchpost_row.TIME}</span></td>
                     </tr>
                     <tr>
			<td class="row1" align="left"><span class="gensmall" style="line-height:150%">
				<!-- BEGIN image -->
				<div  style="float:left; border: 1px {T_TR_COLOR3} solid; margin:5px">{fetchpost_row.image.IMAGE}</div>
				<!-- END image -->
				{fetchpost_row.TEXT}<br /><br />
				{fetchpost_row.OPEN}<a href="{fetchpost_row.U_READ_FULL}">{fetchpost_row.L_READ_FULL}</a>{fetchpost_row.CLOSE}
			</span></td>
                     </tr>
                     <tr>
                        <td class="row3" align="left" height="24"><span class="gensmall">{L_COMMENTS}: {fetchpost_row.REPLIES} :: <a href="{fetchpost_row.U_VIEW_COMMENTS}">{L_VIEW_COMMENTS}</a> (<a href="{fetchpost_row.U_POST_COMMENT}">{L_POST_COMMENT}</a>)</span></td>
                     </tr>
                  </table>
                  <font size="1"><br /></font>
                  <!-- END fetch_post_row -->
               </td>
            </tr>
         </table>
         {END_NEWS}


This is code from smartor portal for PHPBB2, the problem is but my programming skills are too limited to bring this thing to working modification :(

Maybe someone?
edu81
Registered User
Posts: 26
Joined: Sun Jun 21, 2009 6:18 pm
Location: Spain

Re: easyPortal

Post by edu81 »

Could it be possible that the announcements appear with pagination?

example, if the number of announcements exceeds that specified in the configuration of the portal.

Regards.
wvmetaldedication
Registered User
Posts: 6
Joined: Wed Mar 17, 2010 11:30 am
Location: West Virginia, USA
Name: Wilson
Contact:

Re: easyPortal

Post by wvmetaldedication »

Great Mod Noxwizard, I've been messing around a little with it, I added the AJAX Chat to the portal and was just wanting to share how if any one wants to do the same. It's very simple to do, even for a nOOB coder like myself, oh yeah I'm using a basic subsilver2 style that I tweaked to my liking. I've added a screenie below of the end result.

when the AJAX Chat calls to Open index.php, you open portal.php, find

Code: Select all

$user->setup(array('viewtopic', 'mods/easyPortal'));
after add,

Code: Select all

//-- mod : AJAX Chat ----------------------------------------------------
//-- add
include($phpbb_root_path . 'shout.' . $phpEx);
//-- fin mod : AJAX Chat ------------------------------------------------

When the AJAX Chat calls to open index_body.html, you open portal_body.html, find,

Code: Select all

			<br />
			<!-- END fetchpost_row -->
		</td>
Replace with,

Code: Select all

			<br />
			<!-- END fetchpost_row -->
		    <!-- INCLUDE chat_body.html -->
		</td>
Hope ya don't mind me posting this and I'm not even sure this is the right place to post this. I'm working on trying to add a few other mods from my index.php to the portal as well. :)

Cheers
Attachments
portal.png
portal.png (159.57 KiB) Viewed 3478 times
maxrpg
Registered User
Posts: 80
Joined: Thu Jul 30, 2009 12:33 am

Re: easyPortal

Post by maxrpg »

Hello,

EDIT: Nevermind I realised that it strips the BBcodes if the message is trimmed so I set the length of announcements to "0" which shows all text and bbcode. ;)

Ive noticed a little issue with the portal and wondered is there was a fix for it?.

If you view the main portal page the announcements show without BBcodes format like colored text, links etc. But if you view an announcement by clicking the "Read Full" button it does show all the colored text and links.

Is there a way of showing the BBcode format on the main page aswell as the read full page, if that makes sense?

Thank you.
rhopper
Registered User
Posts: 14
Joined: Mon Jul 06, 2009 5:27 am

Re: easyPortal

Post by rhopper »

so I tried adding the ajax chat to my portal and I ended up getting a parse error in my portal_body.html
I uploaded the backed up copy and it still gives me the error! any Ideas?

Parse error: syntax error, unexpected $end in /home/content/r/h/o/rhopper85/html/forum/cache/tpl_1Game_portal_body.html.php on line 266

this is what lines 225 and 226 say in portal_body.html

Code: Select all

								<!-- IF S_DISPLAY_RESULTS --><dd style="float: right;">{poll_option_row.OPTION_PERCENT}<!-- IF poll_option_row.OPTION_VOTED --><b title="{L_POLL_VOTED_OPTION}">x</b><!-- ENDIF --></dd><!-- ENDIF -->
							</dl>
rhopper
Registered User
Posts: 14
Joined: Mon Jul 06, 2009 5:27 am

Re: easyPortal

Post by rhopper »

k i managed to fix the error but now the portal looks really weird, like the stylesheet is off or something but I never touched that. any help plz? the site is parknspeed.com/forum
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10406
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: easyPortal

Post by Noxwizard »

edu81 wrote:Could it be possible that the announcements appear with pagination?

example, if the number of announcements exceeds that specified in the configuration of the portal.

Regards.
It would be possible, however I do not have the time to implement it.


wvmetaldedication wrote:Great Mod Noxwizard, I've been messing around a little with it, I added the AJAX Chat to the portal and was just wanting to share how if any one wants to do the same. It's very simple to do, even for a nOOB coder like myself, oh yeah I'm using a basic subsilver2 style that I tweaked to my liking. I've added a screenie below of the end result.
Thanks for the info!


rhopper wrote:k i managed to fix the error but now the portal looks really weird, like the stylesheet is off or something but I never touched that. any help plz? the site is http://parknspeed.com/forum

Code: Select all

<dl class="<!-- IF poll_option_row.OPTION_VOTED -->voted<!-- ENDIF -->"><!-- IF poll_option_row.OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF -->>
is supposed to be:

Code: Select all

<dl class="<!-- IF poll_option_row.OPTION_VOTED -->voted<!-- ENDIF -->"<!-- IF poll_option_row.OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF -->>

Code: Select all

<!-- IF S_CAN_VOTE --><dd style="width: auto; float: right;"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option_row.OPTION_ID}" value="{poll_option_row.OPTION_ID}"><!-- IF poll_option_row.OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option_row.OPTION_ID}" value="{poll_option_row.OPTION_ID}"><!-- IF poll_option_row.OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF --> 
is supposed to be:

Code: Select all

<!-- IF S_CAN_VOTE --><dd style="width: auto; float: right;"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option_row.OPTION_ID}" value="{poll_option_row.OPTION_ID}"<!-- IF poll_option_row.OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option_row.OPTION_ID}" value="{poll_option_row.OPTION_ID}"<!-- IF poll_option_row.OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF -->
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
rhopper
Registered User
Posts: 14
Joined: Mon Jul 06, 2009 5:27 am

Re: easyPortal

Post by rhopper »

the code you are saying NEEDS to be changed is already changed. Im not getting the error anymore.. but go to www.parknspeed.com/forum and see what Im talking about. The announcement boxes are all white, and the borders and such is all jacked up.
rhopper
Registered User
Posts: 14
Joined: Mon Jul 06, 2009 5:27 am

Re: easyPortal

Post by rhopper »

ah figured it out, the style I use is 1Game, which is a subsilver2 version. I was going by the prosilver installation so it threw it all off.

do you know of any calendars that would work with easyportal?
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10406
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: easyPortal

Post by Noxwizard »

@rhopper: No idea, I don't follow a lot of the other MODs.


@whoever emailed me: http://www.phpbb.com/community/viewtopi ... 5#p9458085
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
rhopper
Registered User
Posts: 14
Joined: Mon Jul 06, 2009 5:27 am

Re: easyPortal

Post by rhopper »

I edited the overall_header.html template to change the "Board Index" to go to the portal. this works. but once Im IN the forums or anywhere else in there, it will only take me back to the forums and not the portal?
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10406
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: easyPortal

Post by Noxwizard »

Browsing around your site, it seems to work fine. The "Portal" link takes you to the portal, and the "Board Index" link takes you to the board index.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10406
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: easyPortal

Post by Noxwizard »

This forum will be locked soon, so please ask for support here: http://www.phpbb.com/customise/db/mod/e ... l/support/
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 26847
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: easyPortal

Post by Paul »

MOD Updated to version 1.0.1
See first post for Download Link
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development
Locked

Return to “[3.0.x] MOD Database Releases”