i take this in installation board..
Quote from: bas123 on April 18, 2008, 10:23:14 PM
I have an update on this...
I discovered that if I add an article and check on the "Use Intro" button, the Intro does show up in the article view/preview page only, However, if I then edit the article (even just once), the radio button behavior described above kicks in.
I would like all articles displayed on the Front Page to be Intros Only, but if I submit the articles and then edit them, I loose the "Use Intro" option.
Is this a bug? or can anyone put me in the right direction.
any answer pls
http://www.tinyportal.net/index.php?action=bugtracker
who can help me ???
I have the exact same problem. After editing an article it's not possible to get the "use intro" option to work. I didn't look into it yet, but I think it's just an submit error in the page somewhere. When I switch on the option to use the intro directly in the SQL database, the option works as it should. So it -must- be just an error when submitting the edits.
Hi,
First let me make perfectly clear that my PHP knowledge is very, very close to zero. I am however good in "analyzing" and in the past I was pretty good in coding in BASIC, which has a lot of similarities with PHP in my opinion. That said, I'd like to let you know that I "fixed" the Use Intro bug, but I don't even know what the hell I did exactly, so please backup your file(s) first! The whole fix consists of just editing one value in one file! :-D
Open TPortalAdmin.template.php
Find the part that reads:
<input align="middle" name="tp_article_switch'.$mg['id'].'" type="radio" value="html"' , $mg['useintro']>-1 ? ' checked="checked"' : '' ,'> '.$txt['tp-gohtml'] .'
(for me that was on line 1663)
Change it to:
<input align="middle" name="tp_article_switch'.$mg['id'].'" type="radio" value="html"' , $mg['useintro']==1 ? ' checked="checked"' : '' ,'> '.$txt['tp-gohtml'] .'
So, all that needs to be done is change >-1 to ==1!
I tested the following things to make sure my "fix" didn't fuck up anything else.
Created new HTML article with NO intro. Article looks okay, database entry looks okay. Radio button behaves as it should.
Edited the article to use intro. Article has intro on frontpage, database looks okay. Radio button represents correct (new) state. Read more link is visible etc. etc. etc.
Switched back to DO en DON'T use intro, everything keeps working okay.
Created PHP and BBC articles to make sure the "fix" doesn't affect those. All seems to be okay.
Created yet another HTML article, this time using an intro from the very start. Did some changing to DO and DON'T use intro and it all seems to keep working as it should.
I hope maybe someone can tell me exactly what the hell I did. :-P And please let me know if this fix also worked for others having this problem.
BTW, I am NOT using a WYSIWYG editor, so I hope this fix doesn't make any difference for people who do. Just wanted to let you know. ;-)
Brilliant hacking InternetRebel !!
This solves the Use Intro save issue ;D
However (as was the case when I changed the field manually in the Database), The Intro display on the front page isn't parsed properly!
ougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf<br /> <img height="72" alt="" width="77" align="right" vspace="9" src="/forum/tp-images/Image/user_1_dot1940.jpg" />bdgpibfpibbg<br /> ougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf<br /> bdgpibfpibbgougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf<br /> bdgpougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf<br /> bdgpibfpibbg<br /> ougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf<br /> bdgpibfpibbg<br />
Read more... Shows up as:
Quoteougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf
<img height="72" alt="" width="77" align="right" vspace="9" src="/forum/tp-images/Image/user_1_dot1940.jpg" />bdgpibfpibbg
ougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf
bdgpibfpibbgougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf
bdgpougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf
bdgpibfpibbg
ougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf
bdgpibfpibbg
Read more...
(Note that there are HTML line breaks in this code which show on the frontpage, but are hidden in the post) + also note that the gibberish is on purpose! as this is a quick test article! Now in the Db here's the Value in the Intro Field (Field = intro | Type = text)
Quoteougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf<br />
<img height="72" alt="" width="77" align="right" vspace="9" src="/forum/tp-images/Image/user_1_dot1940.jpg" />bdgpibfpibbg<br />
ougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf<br />
bdgpibfpibbgougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf<br />
bdgpougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf<br />
bdgpibfpibbg<br />
ougeru eroug doug ohufdgoub gb ouihgohbgrpibrpi pihb gihbgs pihbgelbpg dpihgbighbgf<br />
bdgpibfpibbg<br />
It's been a while since I played around with MySQL but as I recall, the Db Table attributes may be set up incorrectly.
Any thoughts on this? :smiley6600:
Hi Bas123,
Tested your article on my installation with the exact same makeup (only other image) and it works just fine. Article is shown correctly in intro, correctly in complete article and the final data in my database is the same as yours. The intro field is also "text" on my side.
I'd be happy to help you troubleshoot this, so maybe give me some more info. Like; are you using a WYSIWYG editor to enter your text (which I'm not) and do you use any custom theme maybe? Since the resulting text in the database is the same at my end I think your problem must be somewhere else, like in your theme or maybe in your /Sources/Display.php due to some MOD? Speaking of which; do you have any MODs installed that might have an effect on your output?
For comparison, this is MY smf_tp_articles SQL buildup:
CREATE TABLE `smf_tp_articles` (
`id` int(11) NOT NULL auto_increment,
`date` int(11) NOT NULL default '0',
`body` longtext NOT NULL,
`intro` text NOT NULL,
`useintro` tinyint(4) NOT NULL default '1',
`category` smallint(6) NOT NULL default '0',
`frontpage` tinyint(4) NOT NULL default '1',
`subject` text NOT NULL,
`authorID` int(11) NOT NULL default '0',
`author` text NOT NULL,
`frame` tinytext NOT NULL,
`approved` tinyint(4) NOT NULL default '1',
`off` tinyint(4) NOT NULL default '0',
`options` text NOT NULL,
`parse` tinyint(4) NOT NULL default '0',
`comments` tinyint(4) NOT NULL default '0',
`comments_var` text NOT NULL,
`views` int(11) NOT NULL,
`rating` text NOT NULL,
`voters` text NOT NULL,
`ID_THEME` smallint(6) NOT NULL default '0',
`shortname` tinytext NOT NULL,
`sticky` tinyint(4) NOT NULL,
`fileimport` text NOT NULL,
`topic` int(11) NOT NULL,
`locked` tinyint(4) NOT NULL,
`illustration` text NOT NULL,
`headers` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
Quote from: InternetRebel on May 10, 2008, 02:02:33 PM
OK... Lets compare:
YOURS:CREATE TABLE `smf_tp_articles` ( `id` int(11) NOT NULL auto_increment, `date` int(11) NOT NULL default '0', `body` longtext NOT NULL, `intro` text NOT NULL, `useintro` tinyint(4) NOT NULL default '1', `category` smallint(6) NOT NULL default '0', `frontpage` tinyint(4) NOT NULL default '1', `subject` text NOT NULL, `authorID` int(11) NOT NULL default '0', `author` text NOT NULL, `frame` tinytext NOT NULL, `approved` tinyint(4) NOT NULL default '1', `off` tinyint(4) NOT NULL default '0', `options` text NOT NULL, `parse` tinyint(4) NOT NULL default '0', `comments` tinyint(4) NOT NULL default '0', `comments_var` text NOT NULL, `views` int(11) NOT NULL, `rating` text NOT NULL, `voters` text NOT NULL, `ID_THEME` smallint(6) NOT NULL default '0', `shortname` tinytext NOT NULL, `sticky` tinyint(4) NOT NULL, `fileimport` text NOT NULL, `topic` int(11) NOT NULL, `locked` tinyint(4) NOT NULL, `illustration` text NOT NULL, `headers` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
| MINE:
CREATE TABLE `smf_tp_articles` ( `id` int(11) NOT NULL auto_increment, `date` int(11) NOT NULL default '0', `body` longtext NOT NULL, `intro` text NOT NULL, `useintro` tinyint(4) NOT NULL default '1', `category` smallint(6) NOT NULL default '0', `frontpage` tinyint(4) NOT NULL default '1', `subject` text NOT NULL, `authorID` int(11) NOT NULL default '0', `author` text NOT NULL, `frame` tinytext NOT NULL, `approved` tinyint(4) NOT NULL default '1', `off` tinyint(4) NOT NULL default '0', `options` text NOT NULL, `parse` tinyint(4) NOT NULL default '0', `comments` tinyint(4) NOT NULL default '0', `comments_var` text NOT NULL, `views` int(11) NOT NULL, `rating` text NOT NULL, `voters` text NOT NULL, `ID_THEME` smallint(6) NOT NULL default '0', `shortname` tinytext NOT NULL, `sticky` tinyint(4) NOT NULL, `fileimport` text NOT NULL, `topic` int(11) NOT NULL, `locked` tinyint(4) NOT NULL, `illustration` text NOT NULL, `headers` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ;
|
I use a plain text editor (either TextPad or Notepad++ {great for this})
Since I use CuteFTP , sometimes I'll download the file to a temp directory and edit using the above if I'm debugging or am worried about ftp logout, but if I'm doing a quick fix I'm confident with, I'll just use the Edit option with Codified which opens the file with QuteHTML (both from Globalscape).
Regarding your question about Mods and themes:
Here's my settings/versions:Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v1.0.5 beta 1© Bloc | WM Theme based on Tolkien design by Bloc
I tried a test with the SMF Default Theme - Core; and it rendered the same problem - Article shows as textI do have several Mods installed:
Mod Name / Version
1. TinyPortal 1.052
2. Ad Managment 2.3
(I Just Love how he spelled Management) :2funny:3. Auto Embed Video Clips 2.1.5
4. Location on Member List 1.0
5. Previous and Next Links for Page Index 1.0
6. Zodiac_13Moon 2.2
7. EmailFlash 2.0 (NOT WORKING WITH THEME YET)
8. SMF Gallery Lite 1.8.3
9. Streaming 3 4.2.2b
10. Google Member Map 0.1
11. SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update 1.0
12. SMF Theme Contrast Fix 1.1
13. SMF Sitemap 1.2.1
I look forward to your input, InternetRebel :up:
Update --- Since posting above, there's now a new problem.
I modified the one article I have running on the frontpage a couple of times. Now, not only is the "Use Intro" staying checked on "No", but the Radio Buttons for "Article type" ...
Type of article:
HTML article
PHP article
BBC article
External article
Are all remaining unchecked! and although the changes to the article itself are taking hold, the type and intro options will not change...
I checked the TPortalAdmin.template.php
(Which BTW for others monitoring this thread is located in Themes > Default)
and the previous changes remain intact!
TOO WEIRD :tickedoff:
Clear your cache and temp internet files and reboot your browser.
And hows your settings on the storage of the sessions in the Admin/Configuration ? Are they serverside or browser stored ?
Thanks for getting into this G6,
I did clear cache, history etc before reporting this... And again on your suggestion incl a full reboot.
Session settings are:
Enable local storage of cookies (UNCHECKED)
Use subdomain independent cookies (TRIED BOTH - CURRENTLY UNCHECKED)
Caching: SMF has not been able to detect a compatible accelerator on your server.
Therefore "No Caching" selected
Here's a refined behaviour report.
With "Use Intro" CHECKED, The Article appears on frontpage as plain text.
But in Admin, the Articles type "HTML" radio button IS selected! (regardless of whether I check it prior to saving or not)
With "Use Intro" UNCHECKED, Full Article appears on frontpage... BUT in admin, NO Articles type of any kind is selected (again regardless of what I select prior to saving)
I suppose further research in the TPortalAdmin.template.php is called for.
Anyone more versed in php/MySQL up for the challenge?
:smiley6600:
ehem, the reason for this is simply that the useintro field is used to distinguish between types of article. PHP doesn't use intro..whats the use really? ..and BBC is so new I did not add to it.
This is a legacy from TP 0.8.x and I really need to work on that.
QuotePHP doesn't use intro..whats the use really?
Then why do you have the option? Possibly I am not understanding you... What does PHP have to do with this anyway?
Use Intro gives us "Read More >>" That's the point. Isn't the front page all about articles? Why bother with a front page if you only want a BBC Forum?
I want intro's (or truncated articles) to engage the reader but not bore them with the whole thing. Having the interconnectivity with the Forum is the reason... is it not?
If this "FLAW" isn't going to be addressed (for whatever reason) I am surprised and very disappointed..
Having a frontpage does not equal whether you can have introtext or not in articles, and lots of people like JUST to use the option of showing forumposts. Thats no argument at all.
But as I said I gonna work on it, when that will be is another question.
Though it would be a nice option to have Intro text in an article, I personally agree it's should be a low priority.
What I am looking for is properly working Article intros on the front page with a nice little "Read More" link below. That's all.
Similar to Joomla and other programs where you can insert a "Read More" where you want the article to break.
Whatever technique you use to accomplish this goal... doesn't matter.
You could either have a readmore link in the WSYWIG editor, or give an instruction via MySQL to collect X number of characters and then place a Read More Link for the rest. I am not verse enough to suggest any more but hopefully you understand how to do it better than I.
The BBC/Posts have a feature where any post placed in a front page block can be truncated at X many characters.
Until you work this out, I've actually ended up placing my articles in a private board and placed them on the frontpage. The only problem is the limited formatting capabilities of the BBC editor.
Best of luck - I know you have your hands full. ;)
I have the same problem, I DO NOT see a fix that works...I am using 1.1.6 smf and the 1.0.5 beta of TP if the "use intro" thing hs been addressed, could someone please point me to the code correction? THANK YOU
http://www.tinyportal.net/index.php/topic,23466.msg193286.html#msg193286
Read the last row in that post.
I am very proud of my website, the articles make the front end of it look great - so first of all let me say thankyou for the hard work and thought that goes into writing code. If the 3.0 version fixes things I DO NOT see why anyone wouldnt pay a few bucks for the Mod.
On my site what we realized is that the "read more" link appears and works the first time you create the article (provided you have assigned it a category, so just do it right the first time, you can "edit options" just not "edit article". After that you must delete it and or start again.
Looking at the code, and wondering why it works teh first time an article is created and not thereafter....I tried to get it to default to always use the intro - but then i remembered I dont what the heck I am doing having actually never written any php... ;D
Good Luck and thanks again!
Hi Guys,
I had the same problem, which led me to this post - I tried InternetRebel's approach -
Quote"Open TPortalAdmin.template.php
Find the part that reads:
<input align="middle" name="tp_article_switch'.$mg['id'].'" type="radio" value="html"' , $mg['useintro']>-1 ? ' checked="checked"' : '' ,'> '.$txt['tp-gohtml'] .'
(for me that was on line 1663)
Change it to:
<input align="middle" name="tp_article_switch'.$mg['id'].'" type="radio" value="html"' , $mg['useintro']==1 ? ' checked="checked"' : '' ,'> '.$txt['tp-gohtml'] .'
So, all that needs to be done is change >-1 to ==1!"
didn't work for me so I changed it to read "
==-1"(note the "
-" in front of the "1") as this seemed more in line with the lines that followed - bingo, it worked.
Quote from: rossweb on October 08, 2008, 04:03:33 PM
"Open TPortalAdmin.template.php
rossweb, Please supply the path to that file... I can't find it.
bas123 -it's in themes/default/- however it has suddenly stopped working for me when I went to edit the article - I think the problem may go deeper than this.
Additional:- Guess what, if you hit "yes" in the "use intro:" line and do not tick any in the "type of article" box, it starts working :-\
<input align="middle" name="tp_article_switch'.$mg['id'].'" type="radio" value="html"' , $mg['useintro']==1 ? ' checked="checked"' : '' ,'> '.$txt['tp-gohtml'] .'
The purpose of that selection is for article type. The values (choices) for that radio button are "html" vs. "php", "bbc", or "import".
We're looking for the selection to Use Article Intros instead of the full article version.
Indeed the issue goes deeper, and the developers seem to be uninterested in resolving this CORE ISSUE.
I switched to Joomla several months ago. If the main purpose of your site is a Forum, then stick with TP and live with their priorities.
If you are looking for a real Open Source CMS (content management system), go to Joomla or Mambo. You'll need to integrate one of many Forums (including SMF), but they don't even come close to having the kind of problems that TP has.
bas123,
TP was NEVER meant to replace a CMS like Joomla, its just not possible and even really unfair to compare the two as they serve very different needs. I actually prefer Drupal over Joomla again, since Joomla cannot possibly do all that Drupal can do, like content types, better hierarchy possibilites, better cache handling,superior SEO features and so on - which further proves my point about different needs.
However, TP is in beta and many of the problems in beta1 are ironed out in beta2 soon to be released. As TP doesn't have the big support and development team like Joomla, things take more time - but we are nonetheless determined to make our little portal as bugfree and effective in what it does, as the big boys.
Not to mention the fact that the SMF no longer allows its use under Joomla, per the license, unless that has changed just recently.