In my recent post: Google AdSense Now Logs Into Your Sites I mentioned that displaying a quick preview of your content might be useful in some scenarios. 귀하의 사이트에 내 최근 게시물에서 그 콘텐츠의 빠른 미리보기를 표시하는 몇 가지 시나리오에서 유용할 수있습니다 언급 : 구글 애드 센스 지금 로그.Particularly if you want to charge subscription fees for full content. I’ll illustrated with an example so you can get an idea of where to start in accomplishing this with your own sites. 특히 전체 콘텐츠에 대한 구독을하면 수수료 싶어요.하므로 어디에서 시작하여 자신의 사이트와이 연구 결과를 도출하는 방법의 아이디어를 얻을 수 있을지 예를 삽화가거야.The key component in making this work is the substr ($content,0,300) function. 이 작품은 substr ($ 컨텐츠, 0300)의 핵심 구성 요소로 만드는 기능입니다.You specify the length of content by declaring a start (0) and the end (300). 자네가 시작 (0)과 말 (300)를 선언하여 콘텐츠의 길이를 지정할 수있습니다.You can then output a shortened version of $content and store it in a separate variable. 출력 달러의 단축 버전은 다음의 콘텐츠와 그것을 저장할 수있는 별도의 변수에있습니다.Great to use as a “preview” for your content. 위대한 귀하의 콘텐츠에 대한 "미리보기"로 사용합니다.Note: the number refers to the numbers of characters in the provided string, not words. 참고 : 번호를 제공하는 문자열에서 문자의 숫자가 아닌 단어를 말합니다.
What you need to do is figure out the existing variables you’re outputting on each content page (likely found within your template). 당신이 할 경우 각 콘텐츠 페이지에 출력할 수있어 기존의 변수를 알아낼 필요가 뭐가있는 (가능성이 템플릿)을 발견했다.This part goes beyond the scope of this article. 이 부분은이 문서의 범위를 넘는다.All sites are set up with slightly differently variables and even grab content from different sources…this is not an exact science. 모든 사이트를 약간 다르게 변수와도 서로 다른 소스에서 콘텐츠를 잡아 함께 설정할 수있습니다 ... 이것은 정확한 과학이 아니다.
I will assume your data is coming from a mySQL database and $id is a number that refers to a row of content in your database. 내가 mySQL 데이터베이스에서 나오는 것이며 귀하의 데이터를 가정에서 $ id 콘텐츠의 연속하여 데이터베이스에 관련된 편집자 숫자입니다.This first snippet shows a row being queried in preparation for it to be cut down into a preview. 이 최초의 미리보기를 위해 미리보기로 줄일 수에 대비해 쿼리되는 행을 보여줍니다.
$result=mysql_query("SELECT id,content FROM table WHERE id={$id}",$db);ID를$result=mysql_query("SELECT id,content FROM table WHERE id={$id}",$db);
This is even easier when you already have your content in a string. 이 경우에도 당신은 이미 귀하의 콘텐츠를 가지고 문자열에 쉽습니다.In that case you wouldn’t have to run a query on it again. 그 경우에는 다시 그것에 대한 쿼리를 실행할 필요가 없을 것이다.There are also applications in which you would want to have this preview show before you content. 거기에 당신이 전에도 내용이 미리 보여 갖고 싶어 것이 애플 리케이션은 많다.In that case you would only need to integrate something like this into your templates (and yes there is more then one way to do this): 그 경우에는 귀하의 템플릿에 대해서만 이렇게 뭔가를 통합해야한다고 (예가이 일을 더 다음 편도)이다 :
echo"See this entire post<a href= \" showcontent.php?id=".$id."&go=yes \" >here</a>";
//Or you could add something like this (instead of lines 6 & 7) for paid/subscription content&//Or you could add something like this (instead of lines 6 & 7) for paid/subscription content
In my alternate configuration where visitors need to purchase access you should also change your first if statement to check if a user is logged in by doing: 내 대체 구성에서는 방문자들이 어디에서 뭘하고있는 경우 사용자에 의해 기록됩니다 당신은 당신의 진술을 확인하는 경우 가장 먼저 변경해야 액세스를 구매할 필요 : if(isset($go) && isset($user))(isset ($ 가야) & & isset ($ 사용자))
There’s some security and usability you need to consider when implementing this which I didn’t get into. 몇 가지 보안 및 가용성이 내가받을 때 고려해야 할 필요가 구현되지 않았다.As shown above isset () is another very handy function in php as it allows you to set triggers in conjunction with if statements. 로 설정할 수 있도록로서 위의 isset ()는 PHP에서 다른 매우 편리한 기능과 함께 표시되는 진술을 유발하는 경우.This can make a webpage very dynamic. 이것은 매우 역동적인 웹페이지를 만들 수있습니다.
Danny Cooper : I have a blog in a very rare niche, most people, around 80%, who search for it...대니 쿠퍼 : 난 아주 드문 틈새 시장에서 블로그가 대부분의 사람들은 누구에 대한 검색의 약 80 %, ...- [Go To Post]- 포스트로 이동 []
Todd : A good point you made by “Make yourself easily reachable.토드 : "로 만들면서 자신을 쉽게 접속할 수 좋은 지적합니다.One of your biggest... 한 너의 최고의 ...- [Go To Post]- 포스트로 이동 []
A lot of changes going on with Google Analytics: http://analytics.blogspot.com. 많은 변화가 Google Analytics로에가는 : http://analytics.blogspot.com.Some of which will be helpful in making money online =) = 돈 중 일부는 온라인 제작에 도움이 될 것입니다)
How Often To Post New Content On Your Website Or Blog http://tinyurl.com/58ugms 얼마나 자주 새 콘텐츠를 귀하의 웹사이트 또는 블로그 게시물에 http://tinyurl.com/58ugms
Done creating the automatic image thumbnailing script. 자동으로 이미지를 만드는 스크립트 thumbnailing 완료.Now its time to make it better by trying to break it =) 지금은 시간 =) 그것을 깨려고으로 나은 제품을 만들기 위해
Streaming live AT http://toddrecommends.tv/live/ 라이브 스트리밍은 AT http://toddrecommends.tv/live/
Off to hang out with @sclemens @toddkedwards and @payneb 끄기 toddkedwards과 payneb @ @ @ sclemens들과 어울리고
Ha. 하.Debugging a site and found this from a previous developer: "This makes no sense but hopefully will never be executed." 디버깅 및 이전 개발자 사이트에서 제공하는이 발견 : "이것은 말이 안되고 잘하면 실행되지 않습니다.":-\ : - \
Ahh, free shwag. 아, 무료 shwag.Why didnt I start RobMalon.Com sooner =) 내가 왜 진작 시작 RobMalon.Com 그냥 =)
덧글을 남길 :