News:

Wondering if this will always be free?  See why free is better.

Main Menu

ezPortal

Started by SMFHacks.com Team, November 02, 2008, 10:10:03 AM

Previous topic - Next topic

septa/njt rider

I don't know if this was reported or not, but when you try to view a specific category while the portal home page is enabled, it just redirects you to the portal home page, example:

http://njtransitforums.talk4fun.net/index.php#c7

Is there anyway to make this point to:

http://njtransitforums.talk4fun.net/index.php?action=forum#c7

That'll help alot, but i dunno what to edit

Kindred

it's been reported 4 or 5 times...   (try using search or reading the previous posts?)

VBgamer.... Any update on correcting that?

I figured a way around it by installing the categories mod (it changes the category links into actual pages instead of anchors on the main page) but that's a work-around, not actually a fix.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

septa/njt rider

Quote from: Kindred on July 09, 2009, 01:10:36 AM
it's been reported 4 or 5 times...   (try using search or reading the previous posts?)

Sorry, i started reading the topic, but after the first three pages, i just skipped to the last one, which is why i posted that i wasn't sure, sorry i didn't pay close enough attention  :-[ :-[ :-[ :-[

Bluey

Hi
I am trying to get a time and date block working in the left column.  I have this working on another forum using tiny portal but want to get it working on a new one using ezportal.  I set it up in a php block and it centers itself on the page and overrides everything else.  If I just use the clock part of the php it will display fine in the right column but as soon as you put the calendar php in it throws a wobbly. Here is the code. Any ideas?


echo '<div align="center"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="135" height="40">
  <param name="movie" value="http://www.lgapa.com.au/SMF/Themes/default/images/clock14.swf ">
  <param name="quality" value="high">
  <param name="menu" value="false">
  <embed src="http://www.lgapa.com.au/SMF/Themes/default/images/clock14.swf " quality="high"  menu=false pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="135" height="40">
  </embed>
  </object></div>';

global $scripturl, $modSettings, $context, $db_prefix, $user_profile;

smf_loadCalendarInfo();

$now = mktime() + $modSettings['time_offset'] * 3600;

$today = date('j',$now);
$year = date('Y',$now);
$month = date('n',$now);

$days = array($today=>array(NULL,NULL,'<a class="smalltext" style="color:steelblue; font-weight:bold; border:solid 1px black; background-color: white; padding: 0px 4px 0px 4px;" href="'.$scripturl.'?action=calendar;month='.$month.';year='.$year.';day='.$today.'" target="_self">'.$today.'</a>'));

$day_name_length = 2;

$month_href = $scripturl . '?action=calendar&month=' . $month;
$first_day = 0;
$pn = array();

$first_of_month = gmmktime(0,0,0,$month,1,$year);

$day_names = array();                                      #generate all the day names according to the current locale
for($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400)    #January 4, 1970 was a Sunday
    $day_names[$n] = ucfirst(gmstrftime('%A',$t));         #%A means full textual day name

list($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month));

$weekday = ($weekday + 7 - $first_day) % 7;                #adjust for $first_day
$title   = htmlentities(ucfirst($month_name)).' '.$year;   #note that some locales don't capitalize month and day names

@list($p, $pl) = each($pn); @list($n, $nl) = each($pn); #previous and next links, if applicable
if($p) $p = '<span class="smalltext">'.($pl ? '<a href="'.htmlspecialchars($pl).'">'.$p.'</a>' : $p).'</span> ';
if($n) $n = ' <span class="smalltext">'.($nl ? '<a href="'.htmlspecialchars($nl).'">'.$n.'</a>' : $n).'</span>';
$calendar = '<table align="center">'.'<caption >'.$p.($month_href ? '<a href="'.htmlspecialchars($month_href).'">'.$title.'</a>' : $title).$n.'</caption><tr>';

if($day_name_length){                                      #if the day names should be shown ($day_name_length > 0)
    foreach($day_names as $d)
    $calendar .= '<th class="smalltext" abbr="'.htmlentities($d).'">'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'</th>';
    $calendar .= '</tr><tr style="text-align:right;">';
    }

if($weekday > 0) $calendar .= '<td class="smalltext" colspan="'.$weekday.'"> </td>'; #initial 'empty' days

for($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){
    if($weekday == 7){
        $weekday   = 0; #start a new week
        $calendar .= '</tr><tr style="text-align:right;">';
        }

    if(isset($days[$day]) and is_array($days[$day])){
        @list($link, $classes, $content) = $days[$day];
        if(is_null($content))  $content  = $day;
        $calendar .= '<td '.($classes ? ' class="'.htmlspecialchars($classes).'">' : '>').($link ? '<a href="'.htmlspecialchars($link).'">'.$content.'</a>' : $content).'</td>';
        }
    else
        {
        $calendar .= '<td class="smalltext" style="padding-right:4px;"><a';
        if(((($weekday+$first_day) % 7)==0)||((($weekday+$first_day) % 7)==6))
            {
            $calendar .= ' style="color:#C00000;"';
            }
        $calendar .= ' href="'.$scripturl.'?action=calendar;sa=post;month='.$month.';year='.$year.';day='.$day.'" target="_self">'.$day.'</a></td>';
        }
    }

if($weekday != 7) $calendar .= '<td class="smalltext" colspan="'.(7-$weekday).'"> </td>'; #remaining "empty" days

echo $calendar.'</tr>';

/////////////////////////////////////////////////////////////////
//   BIRTHDAY SECTION
//
if (!empty($context['calendar_birthdays']))
{
    echo '<tr><td colspan="2"><hr></td><td colspan="3" class="smalltext" align="center" style="font-weight: bold; color: #' . $modSettings['cal_bdaycolor'] . ';">Birthdays</td><td colspan="2"><hr></td></tr><td colspan="7" class="smalltext">';

    foreach ($context['calendar_birthdays'] as $member)
    {
        $query = db_query(
            "SELECT birthdate
            FROM {$db_prefix}members
            WHERE ID_MEMBER='".$member['id']."'", __FILE__, __LINE__);

        $row = mysql_fetch_assoc($query);
list ($uyear, $umonth, $uday) = explode('-', $row['birthdate']);
        $birthdate = strtotime(sprintf('%04d-%02d-%02d', date("Y"), $umonth, $uday));
        mysql_free_result($query);

        $dummy = array();
        $dummy[] = $member['id'];
        loadMemberData($dummy);
        $profile = &$user_profile[$member['id']];

        echo '<div align="center">';
        echo '<a href="', $scripturl, '?action=calendar;year=' . date("Y") . ';month=' . date("n",$birthdate) . '"><strong>' . date("M j",$birthdate) . '</strong></a>';
        echo ' - ';
        echo '<a href="', $scripturl, '?action=profile;u=', $member['id'], '">';
        if (!empty($profile['member_group_color']))
        {
        echo '<font color="' . $profile['member_group_color'] . '">' . $member['name'] . (isset($member['age']) ? '(' . $member['age'] . ')' : '') . '</font>';
        }
        else
        {
        echo $member['name'] . (isset($member['age']) ? '(' . $member['age'] . ')' : '');
        }
        echo '</a>';
        echo '</div>';
    }
    echo '</td></tr>';
}

/////////////////////////////////////////////////////////////////
//   EVENTS SECTION
//
if (!empty($context['calendar_events']))
{
    echo '<tr><td colspan="2"><hr></td><td colspan="3" class="smalltext" align="center" style="font-weight: bold; color: #' . $modSettings['cal_eventcolor'] . ';">Events</td><td colspan="2"><hr></td></tr><td colspan="7" class="smalltext">';

    foreach ($context['calendar_events'] as $event)
    {
        $query = db_query(
            "SELECT startDate
            FROM {$db_prefix}calendar
            WHERE ID_EVENT='".$event['id']."'", __FILE__, __LINE__);

        $row = mysql_fetch_assoc($query);
        $startdate = strtotime($row['startDate']);

        mysql_free_result($query);

        echo '<div align="center">';
        echo '<a href="', $scripturl, '?action=calendar;year=' . date("Y") . ';month=' . date("n",$startdate) . '"><strong>' . date("M j",$startdate) . '</strong></a>';
        echo ' - ';
        echo $event['link'] ;
        echo '</div>';
    }
    echo '</td></tr>';
}

/////////////////////////////////////////////////////////////////
//   HOLIDAY SECTION
// WHERE title='".str_replace("'","''",$holiday)."'
if (!empty($context['calendar_holidays']))
{
    echo '<tr><td colspan="2"><hr></td><td colspan="3" class="smalltext" align="center" style="font-weight: bold; color: #' . $modSettings['cal_holidaycolor'] . ';">Holidays</td><td colspan="2"><hr></td></tr><td colspan="7" class="smalltext">';

    foreach ($context['calendar_holidays'] as $holiday)
    {
        $query = db_query(
            "SELECT eventDate
            FROM {$db_prefix}calendar_holidays
            WHERE title='".str_replace("'","''",$holiday)."'
            AND (eventDate LIKE '".date("Y")."-%' OR eventDate LIKE '0004-%')", __FILE__, __LINE__);

        $row = mysql_fetch_assoc($query);
        $eventdate = strtotime(date("Y").substr($row['eventDate'], 4));

        mysql_free_result($query);

        echo '<div align="center">';
        echo '<a href="', $scripturl, '?action=calendar;year=' . date("Y") . ';month=' . date("n",$eventdate) . '"><strong>' . date("M j",$eventdate) . '</strong></a>';
        echo ' - ';
        echo $holiday;
        echo '</div>';
    }
    echo '</td></tr>';
}

echo '</table>';



edit-please use the CODE BBC tags!

[A-US]James246

Hi there,

I made a new EzBlock with EzPortal on my website, and I got the PHP Code wrong.

I only made the permissions for Admins to be able to see the EzBlock.

Now, on my website, all that the Admins can see is that EzBlock and nothing else appears accept for the header, footer and navigation bar.

Everyone else can use the website just as normal.

Is there any way I can manually delete this EzBlock without going via the Admin Panel so I can use my website?

Or do I have to uninstall EzPortal all together and start again? How would I do this?

Thanks!

Any fast responses are appreciated as we have tournaments running and I can't update the website.

Link: www.ausblueseals.com
SMF: 1.1.9

[RedDevil]

Quote"The function of good software is to make the complex appear to be simple."
-Grady Booch.

[A-US]James246

No there isn't. I can't even access the site when I'm logged in as an admin. All I see is the error message of it.

I just want to know how I can manually uninstall EzPortal without going to the Admin Panel so I can reinstall it again.

vbgamer45

You will need to go into phpMyAdmin  inside you databse find the smf_ezp_block_layout  table and most likely delete the last entry of that table to fix the issue
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

[A-US]James246

Alright thanks. That fixed it! YAY!

I now have a question.

With the 'Board News' EzBlock, how can I get the title of the post to link to the forum topic, instead of just that little picture doing it?

vbgamer45

Open Sources/Subs-EzPortalMain.php
Find

<a href="', $news['href'], '">', $news['icon'], '</a> <b>', $news['subject'], '</b>

Change to

<a href="', $news['href'], '">', $news['icon'], ' <b>', $news['subject'], '</b></a>
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

[A-US]James246

Alright thanks I got that to work.

Now. How can I remove the '0 comments | Write Comment' and replace it with something like 'Continue Reading...' which has a link to the topic?

[A-US]James246

Oh and also how can I get rid of the 'Powered by EzPortal' in the bottom of the pages so I can move it to underneath 'Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC'?


vbgamer45

I don't support moving the copyright for portal needs to stay where it is at.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

[A-US]James246


vbgamer45

Sources/Subs-EzPortalMain.php you can find the code for newsblock function
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

[A-US]James246


vbgamer45

That i don't know you will have to check it out to find out what to change.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

[A-US]James246

You made the mod and you don't know which part of the code to change?  ::)

vbgamer45

I do but not offhand without looking and I don't have time to do custom things for people
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: