[Solved] Job Mod

Mods etc.

Moderator: Integra Moderator

[Solved] Job Mod

PostAuthor: ayasha » Mon May 08, 2006 11: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
You do not have the required permissions to view the files attached to this post.
Last edited by ayasha on Fri May 12, 2006 7: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 6:10 pm
Cash on hand: 0.00

Re: Job Mod

PostAuthor: found it » Tue May 09, 2006 1: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 5: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 4:29 am
Cash on hand: 0.00

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

thank you found it :lol:
Last edited by ayasha on Wed Dec 31, 1969 5: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 6:10 pm
Cash on hand: 0.00

PostAuthor: MrDSL » Wed May 10, 2006 4: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 5: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 5:34 am
Cash on hand: 0.00

PostAuthor: ayasha » Wed May 10, 2006 4: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 5: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 6:10 pm
Cash on hand: 0.00

PostAuthor: ayasha » Thu May 11, 2006 6: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 5: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 6:10 pm
Cash on hand: 0.00

Re: Job Mod

PostAuthor: Dragonsys » Thu May 11, 2006 6: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 5: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 7:45 am
Cash on hand: 0.00
Location: Springtown, TX

PostAuthor: Dragonsys » Thu May 11, 2006 6: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 5: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 7:45 am
Cash on hand: 0.00
Location: Springtown, TX

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

thank you Dragonsys <img>
Last edited by ayasha on Wed Dec 31, 1969 5: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 6:10 pm
Cash on hand: 0.00

PostAuthor: ayasha » Thu May 11, 2006 6: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 5: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 6:10 pm
Cash on hand: 0.00

PostAuthor: Dragonsys » Thu May 11, 2006 12:26 pm

"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 5: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 7:45 am
Cash on hand: 0.00
Location: Springtown, TX

Re: Job Mod

PostAuthor: Dragonsys » Thu May 11, 2006 12:46 pm

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 5: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 7:45 am
Cash on hand: 0.00
Location: Springtown, TX

PostAuthor: MrDSL » Thu May 11, 2006 12:56 pm

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 5: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 5:34 am
Cash on hand: 0.00

Re: Job Mod

PostAuthor: Dragonsys » Thu May 11, 2006 12:59 pm

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 5: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 7:45 am
Cash on hand: 0.00
Location: Springtown, TX

Re: Job Mod

PostAuthor: ayasha » Thu May 11, 2006 5: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 5: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 6:10 pm
Cash on hand: 0.00

Re: Job Mod

PostAuthor: Dragonsys » Fri May 12, 2006 5:36 am

That is becuase i forgot part of it... sorry

OPEN profilcp/def/def_userfields.php
FIND:
Code: Select all
            'user_buddy_ignored_by_display' => array(                 'lang_key'     => 'Buddy_ignored_by_display',                 'class'        => 'generic',                 'type'         => 'TINYINT',                 'get_mode'     => 'LIST_RADIO',                 'values'       => 'list_yes_no',             ),

AFTER ADD]         'user_job' => array(             'lang_key'     => 'Jobs',             'class'        => 'generic',             'type'         => 'VARCHAR',             'dsp_func'     => 'pcp_output_jobname',             'visibility'   => true,          ),[/code]
Last edited by Dragonsys on Wed Dec 31, 1969 5: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 7:45 am
Cash on hand: 0.00
Location: Springtown, TX

PostAuthor: ayasha » Fri May 12, 2006 6:44 am

ok, i did that, and it still is not showing in the posting view. i will look at this more later, got housework to do today :lol:

EDIT: i fixed it, i had to go into the pcp wizard and alter the page display to show the job name <img>
Last edited by ayasha on Wed Dec 31, 1969 5: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 6:10 pm
Cash on hand: 0.00

PostAuthor: ayasha » Tue Jan 02, 2007 11:27 am

well, i am back on this again, and i was wondering is there a way to edit this so you see

Jobs: Canvas Maker, Painting Hanger

rather than just

Canvas Maker, Painting Hanger

this way newer members will know what it is.

thanks in advance

cleo
Last edited by ayasha on Wed Dec 31, 1969 5: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 6:10 pm
Cash on hand: 0.00

PostAuthor: IntegraMOD » Tue Jan 02, 2007 12:22 pm

You could try looking in the language files or the block template files
Last edited by IntegraMOD on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Image
Please do not PM for support
User avatar
IntegraMOD
Administrator
Administrator
 
Posts: 459
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 11, 2006 4:46 pm
Cash on hand: 0.00
Bank: 100.00
Location: Seattle Wa

PostAuthor: ayasha » Tue Jan 02, 2007 1:50 pm

if i understood the code well enough, i would have already done that gffb, but even if i do look in those files, (and i have before) i end up destroying an entire forum.
Last edited by ayasha on Wed Dec 31, 1969 5: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 6:10 pm
Cash on hand: 0.00


Return to IntegraMOD Modifications

Who is online

Registered users: App360MonitorBot, Bing [Bot], Google [Bot], Helter