[Solved] Job Mod

Mods etc.

Moderator: Integra Moderator

[Solved] Job Mod

PostAuthor: ayasha » Mon May 08, 2006 10:00 pm

need some help with the job mod.

i installed this on my forum some time ago, but had a problem with one of the file edits. it does not seem to keep this mod from working, but i think it would be nice to have this edit in, so the jobs can be viewed in the post. i just cannot find where it tells me to find and i am thinking all it does, is show the members job in their post. correct me if i am wrong. <img>

thanks in advance

cleo

here is the install instructions for the templates/*/viewtopic_body.tpl


#
#-----[ OPEN ]------------------------------------------
#
/templates/*/viewtopic_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<span>{postrow.POSTER_POSTS}<br>

#
#-----[ AFTER, ADD ]------------------------------------------
#
<span>{L_JOBS}: {postrow.JOBS}<br>



here is my viewtopic_body.tpl

well, i have tried to post this file here in quotes, but it does not hold it, and then it stretches the post way out. so i am attaching it
Attachments
viewtopic_body.zip
(2.97 KiB) Downloaded 166 times
Last edited by ayasha on Fri May 12, 2006 6:39 am, edited 1 time in total.
No one can make you feel inferior without your consent.
~Eleanor Roosevelt

ayasha
Sr Integra Member
Sr Integra Member
 
Posts: 634
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 5:10 pm
Cash on hand: 0.00

Re: Job Mod

PostAuthor: found it » Tue May 09, 2006 12:01 am

This is because of PCP which controls everything in view_topic.php with regards to the authors details...I do not know how to do it but MR DSl does if you can get hold of him....

p.s. is there not a PCP version out there for job mod..?

:mrgreen:
Last edited by found it on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http]themes.[/url]
http://www.founditforum.com :: [url=http]Joining people together[/url]

[url=http][img=left]http://www.bbful.com/bbful_banner2.png[/img][/url]
User avatar
found it
Dev Team
Dev Team
 
Posts: 792
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 3:29 am
Cash on hand: 0.00

PostAuthor: ayasha » Tue May 09, 2006 5:52 am

thank you found it :lol:
Last edited by ayasha on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
No one can make you feel inferior without your consent.
~Eleanor Roosevelt

ayasha
Sr Integra Member
Sr Integra Member
 
Posts: 634
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 5:10 pm
Cash on hand: 0.00

PostAuthor: MrDSL » Wed May 10, 2006 3:45 am

I never use the mod but I happen to keep the code I had from a request long ago.

Code: Select all
 //----------------------------------- // // user_jobname output function // //----------------------------------- function pcp_output_jobname($field_name, $view_userdata, $map_name='') {    global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata, $server_url, $db;    global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields, $table_prefix;      $txt = '';    $img = '';    $res = '';    $current_user_id = $view_userdata['user_id'];      if (empty($jobs_array[$current_user_id][0]))    {       $sql = "SELECT `job_name`          FROM " . EMPLOYED_TABLE . "          WHERE user_id = '$current_user_id'";       if ( !($result = $db->sql_query($sql)) )       {          message_die(GENERAL_ERROR, $lang['jobs_error_temployed'], '', __LINE__, __FILE__, $sql);       }       $sql_count = $db->sql_numrows($result);         $jobs_array[$current_user_id] = array();       for ($iv = 0; $iv <sql_count>sql_fetchrow($result) ))          {             message_die(GENERAL_ERROR, $lang['jobs_error_temployed'], '', __LINE__, __FILE__, $sql);          }            $jobs_array[$current_user_id][] = ucfirst($row['job_name']);          $var2 = $row['job_name'];       }      }      if ( $view_userdata['user_id'] != ANONYMOUS )    {    if (!empty($jobs_array[$current_user_id][0]))    {       $jobs = implode(', ', $jobs_array[$current_user_id]);       $txt = $jobs;    }    else    {       $jobs = $lang['jobs_unemployed'];       $txt = $jobs;    }       // result       $res = pcp_output_format($field_name, $txt, $img, $map_name);    }    return $res; }
Last edited by MrDSL on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
MrDSL
PCP Master
PCP Master
 
Posts: 41
Likes: 0 post
Liked in: 0 post
Joined: Thu Apr 27, 2006 4:34 am
Cash on hand: 0.00

PostAuthor: ayasha » Wed May 10, 2006 3:54 am

so what do i do with this code? <img> where do i put it?
Last edited by ayasha on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
No one can make you feel inferior without your consent.
~Eleanor Roosevelt

ayasha
Sr Integra Member
Sr Integra Member
 
Posts: 634
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 5:10 pm
Cash on hand: 0.00

PostAuthor: ayasha » Thu May 11, 2006 5:09 am

bumping...can anyone tell me where to put this code? i cannot find this code in my index_body.tpl

<span>{postrow.POSTER_POSTS}<br>
Last edited by ayasha on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
No one can make you feel inferior without your consent.
~Eleanor Roosevelt

ayasha
Sr Integra Member
Sr Integra Member
 
Posts: 634
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 5:10 pm
Cash on hand: 0.00

Re: Job Mod

PostAuthor: Dragonsys » Thu May 11, 2006 5:30 am

Mr DSL's code would go in
profilcp/def/def_userfuncs_custom.php

Just find
Code: Select all
?>
and add that code before it.
Last edited by Dragonsys on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Image
User avatar
Dragonsys
Sr Integra Member
Sr Integra Member
 
Posts: 326
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 6:45 am
Cash on hand: 0.00
Location: Springtown, TX

PostAuthor: Dragonsys » Thu May 11, 2006 5:31 am

"cleo";p="5490" wrote:bumping...can anyone tell me where to put this code? i cannot find this code in my index_body.tpl

<span>{postrow.POSTER_POSTS}<br>


What exactly are you trying to do with that code? Can you just post that section of the install doc?
That is also handled by PCP
Last edited by Dragonsys on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Image
User avatar
Dragonsys
Sr Integra Member
Sr Integra Member
 
Posts: 326
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 6:45 am
Cash on hand: 0.00
Location: Springtown, TX

PostAuthor: ayasha » Thu May 11, 2006 5:32 am

thank you Dragonsys <img>
Last edited by ayasha on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
No one can make you feel inferior without your consent.
~Eleanor Roosevelt

ayasha
Sr Integra Member
Sr Integra Member
 
Posts: 634
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 5:10 pm
Cash on hand: 0.00

PostAuthor: ayasha » Thu May 11, 2006 5:37 am

"Dragonsys";p="5495" wrote:
"cleo";p="5490" wrote:bumping...can anyone tell me where to put this code? i cannot find this code in my index_body.tpl

<span>{postrow.POSTER_POSTS}<br>


What exactly are you trying to do with that code? Can you just post that section of the install doc?
That is also handled by PCP


if you look up at the first postof this thread, that is what the install instructions says to do to the view_body.tpl. and then MrDSL posted the code i needed here, but did not tell me what file to put it in, or where to put it, so if i understand you right, i do not need to do that edit to the veiw_body.tpl, but to add the code he gave me to the profilcp/def/def_userfuncs_custom.php?



#
#-----[ OPEN ]------------------------------------------
#
/templates/*/viewtopic_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<span>{postrow.POSTER_POSTS}<br>

#
#-----[ AFTER, ADD ]------------------------------------------
#
<span>{L_JOBS}: {postrow.JOBS}<br>
Last edited by ayasha on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
No one can make you feel inferior without your consent.
~Eleanor Roosevelt

ayasha
Sr Integra Member
Sr Integra Member
 
Posts: 634
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 5:10 pm
Cash on hand: 0.00

PostAuthor: Dragonsys » Thu May 11, 2006 11:26 am

"cleo";p="5498" wrote:if you look up at the first postof this thread, that is what the install instructions says to do to the view_body.tpl. and then MrDSL posted the code i needed here, but did not tell me what file to put it in, or where to put it, so if i understand you right, i do not need to do that edit to the veiw_body.tpl, but to add the code he gave me to the profilcp/def/def_userfuncs_custom.php?


Doh, I completely missed that....

Yes, put the code Mr DSL gave you in profilcp/def/def_userfuncs_custom.php
and you do not need to edit view_body.tpl
Last edited by Dragonsys on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Image
User avatar
Dragonsys
Sr Integra Member
Sr Integra Member
 
Posts: 326
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 6:45 am
Cash on hand: 0.00
Location: Springtown, TX

Re: Job Mod

PostAuthor: Dragonsys » Thu May 11, 2006 11:46 am

OPEN profilcp/def/def_usermaps.php
FIND:
Code: Select all
                        'user_points' => array(                                 'txt'          => true,                                 'style'        => '<div>%s</div>',                             ),

AFTER ADD]                         'user_jobname' => array(                                 'dsp_func'     => 'pcp_output_jobname',                                 'txt'          => true,                                 'style'        => '<div>%s</div>',                             ),[/code]

That should add the job name to the posting view.. I think that is what you were wanting...
Last edited by Dragonsys on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Image
User avatar
Dragonsys
Sr Integra Member
Sr Integra Member
 
Posts: 326
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 6:45 am
Cash on hand: 0.00
Location: Springtown, TX

PostAuthor: MrDSL » Thu May 11, 2006 11:56 am

Most pcp adaptation is the same. Once you have the actual pcp_output code which always goes in def_userfuncs_custom or similar then it needs a

field definition and a user definition. The field definition sets the output up and user definition displays it..

in def_userfields.php

Code: Select all
              'user_job' => array(                 'lang_key'     => 'Jobs',                 'class'        => 'generic',                 'type'         => 'VARCHAR',                 'dsp_func'     => 'pcp_output_jobname',                 'visibility'   => true,             ),


and in def_usermaps.php

Code: Select all
                    'user_jobname' => array(                           'txt'          => true,                         'style'        => '<div>%s</div>',                      ),
Last edited by MrDSL on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
MrDSL
PCP Master
PCP Master
 
Posts: 41
Likes: 0 post
Liked in: 0 post
Joined: Thu Apr 27, 2006 4:34 am
Cash on hand: 0.00

Re: Job Mod

PostAuthor: Dragonsys » Thu May 11, 2006 11:59 am

I did forget the userfield...
man, this must have been a longer week than I thought.. I'm forgetting all kinds of things today <img>
Last edited by Dragonsys on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Image
User avatar
Dragonsys
Sr Integra Member
Sr Integra Member
 
Posts: 326
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 6:45 am
Cash on hand: 0.00
Location: Springtown, TX

Re: Job Mod

PostAuthor: ayasha » Thu May 11, 2006 4:45 pm

"Dragonsys";p="5576" wrote:That should add the job name to the posting view.. I think that is what you were wanting...


yes, that is what i was wanting, but it did not work, it still is not showing in the posting view. <img>
Last edited by ayasha on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
No one can make you feel inferior without your consent.
~Eleanor Roosevelt

ayasha
Sr Integra Member
Sr Integra Member
 
Posts: 634
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 5:10 pm
Cash on hand: 0.00

Next

Return to IntegraMOD Modifications

Who is online

Registered users: Bing [Bot], Helter, Majestic-12 [Bot]

cron