News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Viewing the article ... (joomla content items)

Started by kai920, September 09, 2006, 02:09:28 PM

Previous topic - Next topic

kai920

Nope, still no ItemID at the end... ???

Linked URL: /content/view/179/
Should be: /content/view/179/27/

Orstio

OK, let's see if it's SEF.  Try this?

$txt['who_article'] = 'Viewing the article <a href="' . $mosConfig_live_site . '/index.php?option=com_content&amp;task=view&amp;Itemid=%1$s&amp;id=%2$s' . '">%3$s</a>.';

kai920


Orstio

Right, but the URL is not SEF.

Check your Joomla SEF files (like includes/sef.php,joomla.php,  and the mossef mambot).  What you'll be looking for is a "Date Modified" that is more recent than the other files.

kai920

Quote from: Orstio on September 10, 2006, 11:54:48 PM
Right, but the URL is not SEF.

Check your Joomla SEF files (like includes/sef.php,joomla.php,  and the mossef mambot).  What you'll be looking for is a "Date Modified" that is more recent than the other files.

Don't notice anything out of the ordinary. mossef.php (mambot) has not been modified since June 28.

I definitely have not touched includes/sef.php.

I did modify includes/joomla.php, but that was only to change the ordering of the <title> output. I'll try uploading a fresh copy of joomla.php and see if that helps.

kai920

#25
No go. I uploaded fresh copies of joomla.php, and smf.php and smf_integration_arrays.php. :o

PS. When I'm viewing one of the URLs without the ItemID appended, Who's Online shows me as "Viewing the board index..."

Orstio

QuotePS. When I'm viewing one of the URLs without the ItemID appended, Who's Online shows me as "Viewing the board index..."

Yeah, if it can't figure out where you are, it assumes you are on the board index.

kai920

Would it help if you got admin access to poke around my site?

SlammedDime

Not to make this a 'me too' post, but the same issue is happening on this end as well... I thought it was normal... never really dove into the code till I noticed this thread.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

kai920

Quote from: AirRideTalk on September 12, 2006, 02:46:58 AM
Not to make this a 'me too' post, but the same issue is happening on this end as well... I thought it was normal... never really dove into the code till I noticed this thread.

Hey welcome to the club. :)

At least it's not just me... I had thought with the lack of replies I was the _only_ one having this problem...

Orstio

$txt['who_article'] = 'Viewing the article <a href="' . ($mosConfig_sef !='1' ? $mosConfig_live_site . '/index.php?option=com_content&amp;task=view&amp;Itemid=%1$s&amp;id=%2$s' : sefReltoAbs ('index.php?option=com_content&amp;task=view&amp;Itemid=%1$s&amp;id=%2$s') . '/%1$s' ) . '">%3$s</a>.';

kai920

Results with code immediately above:

Who's Online shows "Viewing the article Motorola E680i Review." (looks correct)

Link generated is "www.site.com/content/view/56//54" (extra "/" and the numbers were actually reversed, ie it should be 54/56.)


Orstio

OK, that's easy enough then:

$txt['who_article'] = 'Viewing the article <a href="' . ($mosConfig_sef !='1' ? $mosConfig_live_site . '/index.php?option=com_content&amp;task=view&amp;Itemid=%2$s&amp;id=%1$s' : sefReltoAbs ('index.php?option=com_content&amp;task=view&amp;Itemid=%2$s&amp;id=%1$s') . '%2$s' ) . '">%3$s</a>.';

kai920

Great progress! :)

I would just add a "/" to the end of the URL to make it look like Joomla's, but other than that it looks to be okay. ('%2$s/' instead of '%2$s')

kai920

Working code:

$txt['who_article'] = 'Viewing the article <a href="' . ($mosConfig_sef !='1' ? $mosConfig_live_site . '/index.php?option=com_content&amp;task=view&amp;Itemid=%2$s&amp;id=%1$s' : sefReltoAbs ('index.php?option=com_content&amp;task=view&amp;Itemid=%2$s&amp;id=%1$s') . '%2$s/' ) . '">%3$s</a>.';

I wonder how to change the viewing category/ blogcategory links?  Sorry I don't understand what are all these %1$s %xxxx ... are these Regex terms?

Orstio

QuoteSorry I don't understand what are all these %1$s %xxxx ... are these Regex terms?

No, they just set the ordering of how the information has been passed from the sprintf.  The first string element passed from the sprintf will be %1$s, the second will be %2$s, the third %3$s, etc.

kai920

I'm trying to only hardcode the non-SEF blogcategory like so

$txt['who_blogcategory'] = 'Viewing the category <a href="' . ($mosConfig_live_site . '/index.php?option=com_content&amp;task=blogcategory&amp;id=%1$s&amp;Itemid=%2$s') . '">%3$s</a>.';

But it appears there is no 3rd string element passed in when the id=0. (I have no idea why some of my blog-categories have CID of 0 on my main menu).

I would end up with a link in Who's Online without link text, such as
Viewing the category <a href="http://localhost/index.php?option=com_content&amp;task=blogcategory&amp;id=0&amp;Itemid=56"></a>.


kai920

AirRideTalk: are you having the same problems with category viewing? ???

Orstio

Quote(I have no idea why some of my blog-categories have CID of 0 on my main menu).

Did you create them as blog categories in the Joomla admin panel, or are they just being viewed as blog categories? (Sounds strange, but it is likely).

kai920

I created them as blog categories. Here is what it says under the menu item:

Public       54       Blog - Content Category       0

Advertisement: