Browsing this Thread:   1 Anonymous Users






Re: Email Link & Sorting
#5
Just popping in
Just popping in


See User information
That did it.

I have looked at the access rights to the Alumni listings and set them to have access for registerd users, but no one other than the webmaster is able to modify the listing. Shouldn't the listee be able to alter their own listing? I can see it requireing a webmaster to delete the listing but a couple of the fields should be modifiable.
Thanks, Gabe

Posted on: 2008/2/29 8:55
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: Email Link & Sorting
#4
Webmaster
Webmaster


See User information
You mixed things up.

You changed this:

if ($email) {
$xoopsTpl->assign('contact_occ_head', _ALUM_OCC);
$xoopsTpl->assign('contact_occ', "$occ");
//}
}

It should be this:

if ($email) {
$xoopsTpl->assign('contact_head', _ALUM_CONTACT);
$xoopsTpl->assign('contact_email', "<a href=\"contact.php?lid=$lid\">"._ALUM_BYMAIL2."</a>");
}

Then you must update the module.

That should do it,

John

Posted on: 2008/2/28 6:15
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: Email Link & Sorting
#3
Just popping in
Just popping in


See User information
I made the change but the Email link is still active and allowing you to select it. I pasted the code below that I altered.


//$contact = '<b>' . _ALUM_CONTACT."</b> <a href=\"contact.php?lid=$lid\">"._ALUM_BYMAIL2."</a>";
// Add Template assign by Tom
$xoopsTpl->assign('contact_head', _ALUM_CONTACT);
$xoopsTpl->assign('contact_email', "<a href=\"contact.php?lid=$lid\">"._ALUM_BYMAIL2."</a>");
//if ($tel) {
// $contact .= "<br /><b>"._ALUM_TEL."</b> $tel";
// Add Template assign by Tom
if ($email) {
$xoopsTpl->assign('contact_occ_head', _ALUM_OCC);
$xoopsTpl->assign('contact_occ', "$occ");
//}
}

Posted on: 2008/2/27 23:17
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Re: Email Link & Sorting
#2
Webmaster
Webmaster


See User information
ruggierigm,

Sorry for the delay but here it is.

To do this is a two part process, very easy.


PART 1

Go into the file alumni/index.php around line 422 and 423 look for these lines:

$xoopsTpl->assign('contact_head', _ALUM_CONTACT);
$xoopsTpl->assign('contact_email', "<a href=\"contact.php?lid=$lid\">"._ALUM_BYMAIL2."</a>");

CHANGE THEM TO:

if ($email) {
$xoopsTpl->assign('contact_head', _ALUM_CONTACT);
$xoopsTpl->assign('contact_email', "<a href=\"contact.php?lid=$lid\">"._ALUM_BYMAIL2."</a>");
}

You are just adding
if ($email) {
before those lines, and
}
after those lines.


While you are in this page you should also comment out lines 420 and 435 to look like this:

420
// $contact = '<b>' . _ALUM_CONTACT."</b> <a href=\"contact.php?lid=$lid\">"._ALUM_BYMAIL2."</a>";

435
// $contact .= "<br /><b>"._ALUM_TOWN."</b> $town";

________________

PART 2.

Then go into the file alumni/templates/alumni_item.html around lines 36 thru 42 look for these lines:

<{if $xoops_isuser}>
<tr>
<td class="odd"><b><{$contact_head}></b> <{$contact_email}>
</td></tr>
<{else}>
<tr><td class="odd"><{$alumni_mustlogin}>&nbsp;<{$name}></td></tr>
<{/if}>

Change them to this:

<{if contact_email != ""}>
<{if $xoops_isuser}>
<tr>
<td class="odd"><b><{$contact_head}></b> <{$contact_email}>
</td></tr>
<{else}>
<tr><td class="odd"><{$alumni_mustlogin}>&nbsp;<{$name}></td></tr>
<{/if}>
<{/if}>

Here you are just adding 1 line before those lines and 1 line after those lines.


_____________________________________________________________

As for the sorting, right now the only way to control that is in the file include/functions.php.
Go to around line 109 and find this line:

$result3=$xoopsDB->query("select lid, cid, name, mname, lname, school, year, studies, activities, occ, date, town, valid, photo, photo2, view from ".$xoopsDB->prefix("alumni_listing")." where valid='yes' AND cid=$cid order by date DESC LIMIT $debut,$nb_affichage");

Find the part that says 'order by date DESC'
you could change it to 'order by year DESC' or 'order by year ASC'
or by lname.

There will be sorting in the next version, I will also make the above changes for the email in the next version.
Version 3.0 should be within 1 month.

Hope this helps,

John

Posted on: 2008/2/22 17:30
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top


Email Link & Sorting
#1
Just popping in
Just popping in


See User information
Is their something that I can do to make the Email link not be active when an Email has not been provided?

Also is their a way for me to control the sort of the alumni, I see a way to sort the Schools, was just wondering if it is possible to sort the students.

Thanks, Gabe

Posted on: 2008/2/22 10:05
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create pdf.
You cannot get print page.

[Advanced Search]


Login
Username:

Password:

Remember me



Lost Password?

Register now!
 
Main Menu
 
Who's Online
1 user(s) are online (1 user(s) are browsing Forum)

Members: 0
Guests: 1

more...
 
Donat-O-Meter
Make donations with PayPal!
Stats
Goal: $25.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $25.00