How I create a Plugin whith this code?

18 years 3 months ago #3136 by dudle
This is a hack for CBE to see the UHP link and UHP images in profile,and I don't Know how make a plugins the code , help Please...

To show a link to a User Home Pages in their profile. Follow the steps below.


________________________________________________
|| UHP Version: 0.5 - 25 Oct 2004
|| © Copyright 2004 Ravenswood IT Services
|| A simple system to allow users to create
|| their own home pages, using the standard
|| system editor
|| A basic image upload facility is also
|| available.
_________________________________________________
Step 1) Open up comprofiler.html.php located in the directory "/components/comprofiler/" and find the following lines of code.


<tr>
<td class=sectiontableentry<?php echo $i; ?> width=35% style="font-weight:bold;">
<?php echo _UE_HITS; ?></td>
<td class=sectiontableentry<?php echo $i; ?> ><?php echo $user->hits; ?>
</td>
</tr>
Step 2) Paste the following code above the code in step 1.


<tr><td class=sectiontableentry
<?php echo $i; ?> width=35% style="font-weight:bold;">
<?php echo _UE_UHP; ?></td>
<td class=sectiontableentry<?php echo $i; ?> >
<a href="
<?php echo sefRelToAbs("index.php?option=com_uhp&task=mypage=
show&action=user&id=".$user->id); ?>">
<?php echo _UE_UHP_LINK; ?></a>
</td></tr>
<?php $i= ($i==1) ? 2 : 1; ?>
Step 3) In your language file located in the directory "administration/components/comprofiler/language/" add the following lines of code. You can change the words "HP Albúm" and "ver minha Home Page e meu Albúm de Fotos" to what you like.


DEFINE('_UE_UHP','HP Albúm');
DEFINE('_UE_UHP_LINK','ver minha Home Page e meu Albúm de Fotos ');
///////////////////////////////////////////////////

Ialso hack the Go MyPage modul to work with CB Rc2

Attachment mod_go_mypage.zip not found

Attachments:

Please Log in to join the conversation.

18 years 3 months ago #3137 by rick
I am not a coder so am not able to tell you but would suggestion looking at the API documentation for plugins at www.joomlapolis.com/component/option,com_docman/task,doc_details/gid,16/Itemid,36/

Rick

Running:
Joomla! 1.0.7 Stable
Community Builder 1.0 rc2
SMF 1.1 RC2

Please Log in to join the conversation.

18 years 3 months ago #3923 by scubaguy
Replied by scubaguy on topic Re:How I create a Plugin whith this code?
I just created a very quick plugin for UHP. It displays a link to the user's UHP page if the user has one published otherwise nothing will be displayed.

The text for the link is defined in the plugin parameters.

Attachment plug_uhp_tab.zip not found



Post edited by: scubaguy, at: 2006/01/16 09:14

CB 3rd Party Developer
Web Geek Cafe - development and training www.webgeekcafe.org
YourTribe.com - group social events - www.yourtribe.com
Attachments:

Please Log in to join the conversation.

18 years 3 months ago #4071 by spikec
Replied by spikec on topic Re:How I create a Plugin whith this code?
Which UHP component does this work for? There a couple of them out there -- I'm using the one from ravensportal, uhp_0.5, and it gives me the following error when I click the tab:

Error: No language file could be loaded. Is the UHP component properly installed?

The component is installed and running. Any ideas? Thanks.

Post edited by: spikec, at: 2006/01/17 20:06

Please Log in to join the conversation.

18 years 3 months ago #4078 by scubaguy
Replied by scubaguy on topic Re:How I create a Plugin whith this code?
whoops! I forgot that I left that in there. Yes it does work with the UHP from ravensportal. It is actually looking for a language file under /component/com_uhp/language/english.php (or whatever language you use. You can create the language folder and file if you like to make this error message disappear. The next version of the plugin will create a language file.

CB 3rd Party Developer
Web Geek Cafe - development and training www.webgeekcafe.org
YourTribe.com - group social events - www.yourtribe.com

Please Log in to join the conversation.

18 years 3 months ago #4082 by spikec
Replied by spikec on topic Re:How I create a Plugin whith this code?
Hey, that did the trick! Thanks! this is a nice little plug-in.

Is there any thing in particular that needs to be in the [language].php file?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.339 seconds

Facebook Twitter LinkedIn