Welcome, Guest. Please Login or Register.
May 24, 2024, 07:39:53 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  ¡Personalized URL Link for each category! « previous next »
Pages: [1] 2 Reply Ignore Print
Author Topic: ¡Personalized URL Link for each category!  (Read 4065 times)
hprod
Jr. Member
**
Posts: 84


En mi debilidad me haces fuerte, Señor (San Pablo)

¡Personalized URL Link for each category!
« on: November 28, 2003, 06:45:21 PM »
Reply with quote

Hello everybody!
Here I explain you my problem and a possible solution that could be a MOD:

Problem:

I have each Category relationed with a web page.
I would like to show the link of that web each time a topic belonging to that category is showed.

Solution
Maybe it is possible to add a form box at the creation category option where you can specify the name and url of the relationed web page, and after that show the link when a topic of that category it is showed.

May you help me to build this hack!?
Thanks a lot!!!!

I love YaBBSE and this FREE community!
« Last Edit: November 28, 2003, 06:45:59 PM by hprod » Logged
Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:¡Personalized Url Link for each category!
« Reply #1 on: November 28, 2003, 06:51:05 PM »
Reply with quote

Where did you want this link to be shown?  Did you want the category name to be a hyperlink to the page?

If you mean what I am thinking, this shouldn't be too difficult to code in..
Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
hprod
Jr. Member
**
Posts: 84


En mi debilidad me haces fuerte, Señor (San Pablo)

Re:¡Personalized Url Link for each category!
« Reply #2 on: November 29, 2003, 08:09:31 AM »
Reply with quote

I would like to show an hyperlink (with a description) to that page.
It could be shown like in this picture:


Thanks a lot Shadow's Pawn
Logged
Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:¡Personalized Url Link for each category!
« Reply #3 on: November 29, 2003, 04:36:36 PM »
Reply with quote

I believe you want look in messageindex.php for this line


   echo '
      <table width="100%" cellpadding="0" cellspacing="0">
         <tr>
            <td><a name="top"></a>' . $displayLinkTree . '</td>
         </tr>
      </table>';


then just add another table column to that with your link and description.  You'll probably want to align the column to "right."

Hope that helps.
Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:¡Personalized Url Link for each category!
« Reply #4 on: November 29, 2003, 06:58:54 PM »
Reply with quote

you could also put the link in the product description, which shows at the top of messageindex too, and hack display so it shows the board's description too... that way you're using the existing code to save information for each board
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:¡Personalized Url Link for each category!
« Reply #5 on: November 29, 2003, 07:11:47 PM »
Reply with quote

I haven't tested this at all, but it could work  ::)

in Sources/Display.php search for:

   $result = mysql_query("SELECT b.ID_CAT,b.name,c.name,c.memberGroups FROM {$db_prefix}boards as b,{$db_prefix}categories as c WHERE (b.ID_BOARD=$currentboard && b.ID_CAT=c.ID_CAT)") or database_error(__FILE__, __LINE__);
   list($curcat,$boardname,$cat,$temp2) = mysql_fetch_row($result);
   $memgroups = explode(',',$temp2);


and replace with:

   $result = mysql_query("SELECT b.ID_CAT,b.name,b.description,c.name,c.memberGroups FROM {$db_prefix}boards as b,{$db_prefix}categories as c WHERE (b.ID_BOARD=$currentboard && b.ID_CAT=c.ID_CAT)") or database_error(__FILE__, __LINE__);
   list($curcat,$boardname,$bdescrip,$cat,$temp2) = mysql_fetch_row($result);
   $memgroups = explode(',',$temp2);


and now search for:

      <table width="100%" cellpadding="0" cellspacing="0">
         <tr>
            <td valign="bottom"><a name="top"></a>' . $displayLinkTree . '</td>
            <td valign="bottom" align="right">
               <font size="1" class="nav">' . $previousNext . '</font>
            </td>
         </tr>
      </table>


and add after:

   ';
   if ($ShowBDescrip)
   {
      echo '
      <table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="' . $color['bordercolor'] . '" class="bordercolor"><tr><td>
         <table width="100%" cellpadding="3" cellspacing="1" border="0" bgcolor="' . $color['bordercolor'] . '" class="bordercolor">
            <tr>
               <td align="left" class="catbg" bgcolor="' . $color['catbg'] . '" width="100%"  height="30">
                  <table cellpadding="3" cellspacing="0" width="100%">
                     <tr>
                        <td width="100%"><font size="1">' . $bdescrip . '</font></td>
                     </tr>
                  </table>
               </td>
            </tr>
         </table>
      </td></tr></table>';
   }
   echo'


and hope it works and that it does what you want... let us know how it went :)
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
hprod
Jr. Member
**
Posts: 84


En mi debilidad me haces fuerte, Señor (San Pablo)

Re:¡Personalized Url Link for each category!
« Reply #6 on: November 29, 2003, 07:20:48 PM »
Reply with quote

Thks a lot Anguz and Shadow.
I have been looking for other solution. See it:

- As there is a description field for each category, I write the url there. But the url doesnt turn into an hyperlink when it is showed. How can I do that?
- And I would like to show description at the top of each topic showed from that category. Maybe Anguz solution is the answer. isnt it?
« Last Edit: November 29, 2003, 07:23:09 PM by hprod » Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:¡Personalized Url Link for each category!
« Reply #7 on: November 29, 2003, 07:28:56 PM »
Reply with quote

yes, that's exactly what I was suggesting...

use html in the board description cause they aren't passed through the ubbc thing ;)
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
hprod
Jr. Member
**
Posts: 84


En mi debilidad me haces fuerte, Señor (San Pablo)

Re:¡Personalized Url Link for each category!
« Reply #8 on: November 29, 2003, 07:37:28 PM »
Reply with quote

Anguz,
I did the code modification you wrote but it didnt work. The result is the same as if without any modification.
Maybe the problem is the variable:
$ShowBDescrip
it hasnt a value.
is it a Boolean?
Where does it take a value?

And, guessing it works... this hack will show category description at each topic, but I would like to parse URL in descriptions into hyperlinks. How can I do it?

Thanks again for your great help!!!
« Last Edit: November 29, 2003, 07:39:09 PM by hprod » Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:¡Personalized Url Link for each category!
« Reply #9 on: November 29, 2003, 07:56:28 PM »
Reply with quote

sorry about that...

in Sources/Display.php search for:

function Display()
{


and add after:

   global $ShowBDescrip;

and to create a link in the description, just use html

<a href="http://domain.tld/" target="_blank">your link text</a>

;)
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:¡Personalized Url Link for each category!
« Reply #10 on: November 29, 2003, 11:22:08 PM »
Reply with quote

please let me know if it worked so I don't worry about having made another mistake anymore ::)
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
hprod
Jr. Member
**
Posts: 84


En mi debilidad me haces fuerte, Señor (San Pablo)

Re:¡Personalized Url Link for each category!
« Reply #11 on: November 30, 2003, 03:27:40 PM »
Reply with quote

YEAHHHHHHHHHHHHHHHHH!
IT WORKS LIKE A CHARM!!!

Anguz, thank you very much.


« Last Edit: November 30, 2003, 03:28:07 PM by hprod » Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:¡Personalized Url Link for each category!
« Reply #12 on: November 30, 2003, 05:37:39 PM »
Reply with quote

cool  :D

I tried taking a look at your forum but couldn't, so I'm glad you're telling me :)

I got this error message

QuoteForbidden
You don't have permission to access to this document on this server.
Apache Server at marianistas.org
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
hprod
Jr. Member
**
Posts: 84


En mi debilidad me haces fuerte, Señor (San Pablo)

Re:¡Personalized Url Link for each category!
« Reply #13 on: December 01, 2003, 10:55:39 AM »
Reply with quote

Try this one:
http://www.marianistas.org/foros.php
If you cant get into, maybe your ip is banned for any reason. Send me your IP and I will give you permission.

Thanks again!
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:¡Personalized Url Link for each category!
« Reply #14 on: December 01, 2003, 05:17:06 PM »
Reply with quote

Quote from: hprod on December 01, 2003, 10:55:39 AM
Try this one:
http://www.marianistas.org/foros.php
If you cant get into, maybe your ip is banned for any reason. Send me your IP and I will give you permission.

Thanks again!

you're welcome ;)

no, I couldn't load the page, got the same error... I'll send you an IM with my ip in a moment... thx :)
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
Pages: [1] 2 Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  ¡Personalized URL Link for each category! « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.027 seconds with 20 queries.